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

What are void pointers?

710


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.

1568


What is java used for on a computer?

507


What is instance synchronization?

542


What is java oops?

551






What are the various access specifiers for java classes?

543


can java object be locked down for exclusive use by a given thread? : Java thread

527


Explain the pointers in Java?

595


Break statement can be used as labels in java?

551


Explain about oops concepts.

632


How we can declare a static variable?

650


What is thread safe singleton?

515


What does a boolean method return?

626


What is difference between string and stringbuffer?

490


What are the benefits of operations?

510