Infinite loop using while ?

Answers were Sorted based on User's Feedback



Infinite loop using while ?..

Answer / nav dev

boolean a=true;
while(a)
{
//here a should be boolean type
System.out.println(a);
}

Is This Answer Correct ?    4 Yes 0 No

Infinite loop using while ?..

Answer / sanjay singh bisht

while(true)
{
System.out.println("sanju baba");
}

Is This Answer Correct ?    2 Yes 0 No

Infinite loop using while ?..

Answer / nitin

int a=5;
while(a)
{
System.out.println(a);
}

or

while(true)
{
System.out.println("true");
}

Is This Answer Correct ?    1 Yes 0 No

Infinite loop using while ?..

Answer / sukale shobha balshiram

int a=0;
while(a+1)
{
System.out.println(a);
}

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More Core Java Interview Questions

What is the is a and has a relation ship in oops concept in java?

9 Answers   BearingPoint, TCS,


What is flag in python?

0 Answers  


Can we assign null to double in java?

0 Answers  


What is the full name of java?

0 Answers  


how to java plateform independent?

5 Answers   TCS,


What problems will occur when you don?t use layout managers?

1 Answers  


What is formatted output in java?

0 Answers  


What is 'finally' method in Exceptions?

4 Answers  


What are invisible components?.

0 Answers  


What are identifiers in java?

0 Answers  


Is integer immutable in java?

0 Answers  


Explain Event handling in AWT?

1 Answers   Infosys, TCS,


Categories