is this possible to create an array of 0 length?
if so how? if not so why?
coz we have an array in main() likw this
"static void main(String [] s) then what it signifies?

Answer Posted / sushila

yes we can create array with 0 length.

public class A
{
static int b[];
public static void main(String args[])
{
System.out.println("-----------------");
System.out.println(b);
System.out.println("-----------------");
}
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to re-reach and use an object once it has been garbage collected. How it's possible?

543


How do you convert bytes to character in java?

537


Explain the access modifiers for a class, method and variables?

662


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

1572


What is the r character?

588






What is meant by the value of a variable?

462


What is the difference between exception and error in java?

493


List out benefits of object oriented programming language?

487


What is palindrome in java?

562


What are new features introduced with java 8 ?

552


What is the main advantage of passing argument by reference?

505


What is double data type?

541


What is string data type?

555


Why java is platform independent? Explain.

601


What is <> used for in java?

671