Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is difference between add() and addelement() in vector?

1511


Explain about method local inner classes or local inner classes in java?

1009


Difference between overriding and overloading in java?

1052


How do you compare arrays in java?

927


What does nextint () do in java?

961


What is a variable declaration?

964


Are strings immutable in java?

961


Describe the term diamond problem.

1017


When throw keyword is used?

1050


What are multiple inheritances?

1094


How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?

950


What is a class in java?

993


What is the final method?

1060


Can a function return a function?

1019


Explain constructors and types of constructors in java.

1087