wood burning stoves 2.0
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Valentin Watch "Valentin New topic

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

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

[Blog] [Blogroll] [My Reviews] My Linked In
I agree. Here's the link: http://aspose.com/file-tools
subject: Valentin's Question 38
jQuery in Action, 3rd edition