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.

*/

}

Answers were Sorted based on User's Feedback



for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert so..

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

for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert so..

Answer / 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

for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert so..

Answer / $ourav

static int []arr=new int[10];
arr[i]++;

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Core Java Interview Questions

What are Font and FontMetrics classes?

1 Answers  


Explain the differences between public, private, protected and static?

4 Answers  


What is type inference in java8?

0 Answers  


what is deadlock? : Java thread

0 Answers  


Why do we need autoboxing in java?

0 Answers  


what is static import in java? Explain

0 Answers  


we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on-startup> in deployment descripter for loading servlets like serv1 N serv2? so 'll it take serv1 or serv2

2 Answers   CSC,


What are some characteristics of interference class?

0 Answers  


Explain the term virtual machine?

0 Answers   Adobe,


What is the platform?

0 Answers  


What is the byte range?

0 Answers  


How to transfer data from an Applet to Servlet ?

1 Answers  


Categories