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
What is an accessor?
How to sort an array in java without using sort method?
Which is easier netbeans or eclipse?
What is a two-pass assembler?
Can an integer be null java?
What does += mean coding?
Explain the usage of this with constructors?
What do you understand by copy constructor in java?
What is the difference between overriding & overloading?
How do you escape in java?
What is final int?
What is string variable?
What is e java?
What classes of exceptions may be thrown by a throw statement?
What is the super void?