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 to create multithreaded program? Explain different ways of using thread? : Java thread

769


What are the uses of synchronized keyword?

785


What is the use of static methods?

824


What is final keyword in java?

812


How do you detect memory leaks?

808


What is a consumer in java?

808


what are the disadvantages of indexes in oracle?

2123


What is communist flag?

794


What is listnode in java?

769


What is difference between an object and a class?

866


What is java argument list?

726


Can we write any code after throw statement?

849


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

860


Explain the difference between throw and throws in java?

797


How do you override a variable in java?

775