File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mock Exam Errata and the fly likes Valentin's Question 38 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Valentin Watch "Valentin New topic
Author

Valentin's Question 38

Steve Lovelace
Ranch Hand

Joined: Sep 03, 2003
Posts: 125
Given this code:the desired answser is:
Compilation error on lines 1 and 4.
However, under 1.4.1-b21 anyway, this code compiles and runs just fine.
[ September 18, 2003: Message edited by: Steve Lovelace ]

The Inner that is named is not the true Inner.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Hi Steve,
You are right, the code runs under 1.4.1-b21.
But the thing is that the only authoritative document you should count on is the Java specification and not the different Java implementations. JLS 14.20 Unreachable statements says that the code in question 38 should not compile.
I hope this helps


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
 
subject: Valentin's Question 38
 
Threads others viewed
Question 38
Unreachable stmts
Inner classes
Question38 from Valentin Crettaz
Valentin's mock exam no1
IntelliJ Java IDE