how to accept integer array in java

Answer Posted / saluru srinivasa rao

int []anarray=new int[10];
for(int i=0;i<=anarray.length;i++)
{
anarray[i]=i;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you serialize a singleton class without violating singleton pattern?

1752


Is java still relevant?

738


What are the string methods in java?

826


Differentiate between the constructors and methods in java?

734


What is the primary benefit of encapsulation?

781


Is main an identifier?

769


Can a class have 2 constructors?

679


What does compareto () do in java?

787


What are the steps involved to create a bean?

896


Can we nested try statements in java?

858


how come we know the object is no more used in the class?

6001


List two java ide’s?

819


Explain 5 features introduced in jdk 1.7?

815


What are the benefits of immutable objects?

764


Does java vector allow null?

732