File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt in continue and break Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt in continue and break" Watch "doubt in continue and break" New topic

doubt in continue and break

Divya Gehlot
Ranch Hand

Joined: Sep 10, 2006
Posts: 243

1) Compile time error, System.out has no print method
2) No output at runtime
3) Output of 0
4) Compile error, break cannot occur after its target label

I expected the output to be 01 but when I run the above program got the ouput 0 . Can anybody explain me ?

SCJP1.5(81%), SCDJWS(94%), next mission SCEA (but need to wait or that)
Nik Arora
Ranch Hand

Joined: Apr 26, 2007
Posts: 652
Hi Divya,
Dont post multiple times the same question.Just check out your previous post.

It is sorta covered in the JavaRanch Style Guide.
subject: doubt in continue and break
It's not a secret anymore!