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.cusat.it2007
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 ? | 3 Yes | 2 No |
Post New Answer View All Answers
write a program that list all permutations of ABCDEF in which A appears before B?
What is final modifier?
How many threads can I run java?
How does compareto method work?
What is dot operator?
What is appletviewer?
What is object of class in java?
How many bits is a float?
What is array command?
How do you take thread dump in java?
What is numeric function?
How many bits is a char?
In java, how we can disallow serialization of variables?
What is byte code and why is it important to java’s use for internet programming?
What is a databasemetadata?