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 / abhishek kumar
class X
{
public void method()
{
int x=0;
do{
x++;
System.out.println(x);
}
while(x<10);
{
System.out.println("this is your Ptogaram");
}
}
public static void main(String[] as)
{
X a=new X();
for(int i=0;i<100;i++)
{
a.method();
break;
}
}
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain aggregation in java?
How do you calculate square roots?
What is the point of polymorphism java?
What is re-factoring in software?
What is object data type?
How dead lock situation occurs in java and how you can identify it?
How many types of memory areas are allocated by jvm?
What is the main purpose of java?
What is bigger kb or mb?
What does percent mean in java?
What is bom encoding?
What is heterogeneous in java?
how to write a program for sending mails between client and server
Program to Find the second largest element in an array.
What do you mean by a JVM?