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

I/O blocking means?

1 Answers  


Is hashmap thread safe?

0 Answers  


Can private class be inherited in java?

0 Answers  


My application URL : http://localhost:8080/Application/Login.jsp. When a user enter this url in IE then, how it get Login.JSP Page exactly? what are the processes will happen from when we submit the URL to get Login.jsp?

3 Answers   IBM, TCS,


What is the full name of java?

0 Answers  






Explain the difference between arraylist and linkedlist in java?

0 Answers  


Can we serialize arraylist in java?

0 Answers  


Difference between this(), super()?

12 Answers   College School Exams Tests, Oracle,


placement papaers of spring computing technology

0 Answers   Spring Computing Technologies,


Write a java program to generate fibonacci series ?

0 Answers   Cyient,


What is the difference between sop and work instruction?

0 Answers  


What is the symbol for average?

0 Answers  


Categories