Infinite loop using while ?
Answers were Sorted based on User's Feedback
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 |
Answer / sanjay singh bisht
while(true)
{
System.out.println("sanju baba");
}
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
Answer / sukale shobha balshiram
int a=0;
while(a+1)
{
System.out.println(a);
}
Is This Answer Correct ? | 4 Yes | 4 No |
What are the differences between c++ and java?
What is mean by collections in java?
What is meant by data hiding in java?
Can you start a thread twice in Java?
what is the difference b/w static and final methods?
Can we override private constructor in java?
What is anagram word?
What is threaded programming and when is it used? : Java thread
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
Why are lists ordered in java?
Can a class be final?
Can a method inside a interface be declared as final?