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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can It is possible to synchronize the constructor of a Java Class?

795


how we can create packages in java?

704


What is java and why do we need it? Explain

790


Differentiate jar and war files?

778


What are Normalization Rules? Define Normalization?

750


Explain parallel processing in java8?

881


What is a variable declaration?

744


What is the difference between stringbuffer and stringbuilder?

756


What is empty string literal in java?

771


What restrictions are placed on method overloading in java programming?

752


What does string intern() method do?

816


Difference between ‘is-a’ and ‘has-a’ relationship in java?

756


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

772


What is a private class in java?

718


What are scalar data types?

694