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 is the life cycle of an Applet ?
Explain the difference between an object-oriented programming language and object-based programming language?
What is meant by anonymous class?
Difference between String & StringBuffer
16 Answers IBM, Infosys, Tech Mahindra, Wipro,
Why we use protected in java?
Can we increase array size dynamically in java?
What do you mean by collectors in java 8?
How do you declare an infinite loop?
Realized?
How to connect to a remote database using Applet?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Where to store local variables?