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 |
My interview asked what is dynamic variable in java and where we use them.
What are the data types supported by java?
What is left shift and right shift?
What are the four pillars of java?
Write a program to print count of empty strings in java 8?
What is difference between iterator and enumeration in java?
How do you invoke a method?
hi to all. well can you please tell me that why String class is immutable? Thanks in advance.
What is a method header?
Is there any difference between nested classes and inner classes?
Write a java program that prints all the values given at command-line.
What does file separator do in java?