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 |
give me the answer of this code class A extnds String This code we can write r not in Java? Explain?
what happens when a thread cannot acquire a lock on an object? : Java thread
Can a main method be overloaded?
What are different types of references?
What is class array in java?
Why java applets are more useful for intranets as compared to internet?
can we access the method of class without creating the object of the class
what are upcasting and downcasting?
Explain methods specific to list interface?
Which is the best way to use for String concatenation in Java?
What is the difference between scrollbar and scrollpane?
What is gc()?