Dhawal Mehta

Greenhorn
+ Follow
since Jun 13, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dhawal Mehta

Runtime exception are those condition which occurs when the program is running and some thing goes wrong e.g. ArrayOutOfBoundException when its elements exceede Array size. So this exceptions can be handled through Exception Handling.

Error is a condition which cannot be handled by our program and it is also not handled by java run time environment e.g Stack overflow.
14 years ago
Its a very great forum for all of us.. I also want to learn hibernate.. Thanks for this links....
Welcome Srinivas!!!

-- Dhawal Mehta
Yes .. I have run this code already...

but what i found is that when the control goes to 'while' loop.. it first executes the most inner 'if' loop and then execute the other instructions..

Is that correct?
14 years ago
Thanks a lot for your warm welcome Campbell..

May you please check my previous post and tell me if i am correct....
14 years ago
Hey Everybody.

Jimmy is right. we have to place the first If loop after statements ans the output got correct.

One thing more I noticed that when control enter while loop it first go to the If loop and print the statement under this loop first:

if (beerNum > 0) {
System.out.println(beerNum + " " + word + " of beer on the wall");
}

and the goes to the while loop statements. Am i correct?
14 years ago