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?

Answers were Sorted based on User's Feedback



is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in..

Answer / priyanjan

Yes,it is possible to create the array of length 0. by
defining as:
int[] arr = {};

String[] s signifies the command line argument

Is This Answer Correct ?    29 Yes 0 No

is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in..

Answer / ravikiran

it infers that the main method is capable of holding string
array as an argument

Is This Answer Correct ?    7 Yes 0 No

is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in..

Answer / 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

More Core Java Interview Questions

in a constructor what happen if u call super and this in the same class? i know that it is not possible to call both in the same one? if we call what will happen?

10 Answers   ITC Infotech,


Why do we create public static method in java?

0 Answers  


What is annotation in java?

0 Answers  


What are hot spots in Java programming?

1 Answers  


Is an integer an object?

0 Answers  






What is autoboxing and unboxing?

0 Answers  


What are the features of java?

0 Answers  


What is meant by Java interpreter?

4 Answers  


What about abstract classes in java?

0 Answers  


Which number is denoted by leading zero in java?

0 Answers  


What is the string function?

0 Answers  


How to read and write image from a file ?

0 Answers  


Categories