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 |
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
What is function and method in java?
Why we can not force Garbage Collection?
System.out & System.in are final static data member of System class but we can change there reference through setOut() & setIn() method how...
What is the use of static class?
Can array grow dynamically in java?
What is meant by string is immutable?
How many functional interfaces does java 8 have?
10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }
What is difference between == and === in js?
What is the reflection?
Explain restrictions for using anonymous inner classes?