|
|
|
Loops in Java
Note: Here,
SOP = System.out.println("");
psvm()=public static void main(String args[])
|
No. |
Java Question |
Answer/Output |
Explanation |
|
1 |
byte b = 2;
while (++b > 0);
SOP("Java"); |
b and goes upto 127, overflow occurs so b is set to negative value, loop ends and
prints Java. |
- |
|
2 |
do while(false); |
Compile Time Error |
- |
|
|
Let The World Know How Knowledgeable You
Are By
sharing Your Knowledge With Others If you would like to share your knowledge
relating to Technology, you can send it to us at
dailyquestion@techstudentsworld.com. If it is good, it will be published in this
site along with your name or picture. |
Copyright © 2008, Techstudentsworld.com. All Rights
Reserved.
|
|
|