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.
*/
}
Answers were Sorted based on User's Feedback
Answer / 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 |
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 |
Does treeset use compareto?
what is a thread pool in java and why is it used?
Can we make constructors static?
what is the difference between ArrayList and Vector
19 Answers KPIT, Sasken, Satyam, Span Infotech, Wipro,
What is the difference between yielding and sleeping in java programming?
Can an interface be final?
What do you mean by hashing?
Can we declare variables inside a method as Final Variables?
Can you explain the usages of class.forname()?
what is a working thread? : Java thread
How can we get one Interface methods whit out using implementation of interface
Can arraylist contain null values?