aspose file tools*
The moose likes Mock Exam Errata and the fly likes Valentin's Question 38 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Valentin's Question 38
 
Similar Threads
Question38 from Valentin Crettaz
Inner classes
Valentin's mock exam no1
Question 38
Unreachable stmts