for(i=0;i<100;i++)
{
int i=method();//method returns no's from 1 to 10;


/*
insert some stmts which can give output like no.of times
numbers(1-10) returned. (for example if it returns 2 then i
want output how many times 2 returned) like that i want
output for no's 1 - 10 how many times each no returned.

*/

}

Answer Posted / $ourav

static int []arr=new int[10];
arr[i]++;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are adapter classes?

599


In a class implementing an interface, can we change the value of any variable defined in the interface?

559


What is finally and finalize in java?

594


What is indexof?

545


Explain about doubly linked list

619






What is a java lambda expression?

558


What is variable argument in java?

558


Can you have two constructors in java?

503


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

617


What is comparable and comparator interface? List their differences

581


What is lambda expression in java?

543


How do you replace all in word?

533


What is the difference between jdk, jre, and jvm?

572


In java, how we can disallow serialization of variables?

554


What is thread safe in java?

551