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
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 |
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 |
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 |
What are the rules for variable declaration?
What is nan in java?
What is data member in java?
what is dynamic method dispatch ?
27 Answers Fidelity, MUET, SDSF,
Can It is possible to synchronize the constructor of a Java Class?
Write a program to print count of empty strings in java 8?
Can set contain duplicates?
Explain about anonymous inner classes in java?
What is boolean example?
when to use abstract class and when to use interface?
16 Answers Exterro, iGate, IonIdea,
What is stack example?
how can i cal servlet from jsp page?how can i pass variablesfrom the jsp that servlet can access?