Hi,
there are compilation errors "non-static variable k cannot be referenced from a static context" in code examples in the points:
"4. java.lang.ArithmeticException extends java.lang.RuntimeException"
and
"6. java.lang.ExceptionInInitializerError extends java.lang.Error"
in http://enthuware.com/downloads/Exceptio ... ummary.pdf
In both cases the line "public class X { int k = 0; " should be changed to "public class X { static int k = 0; ".
Compilation errors in two code examples in ExceptionClassSum
Moderators: Site Manager, fjwalraven
-
- Posts: 11
- Joined: Wed Dec 07, 2016 3:21 pm
- Contact:
-
- Site Admin
- Posts: 10036
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: Compilation errors in two code examples in ExceptionClas
You are right. It should be static.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: Bing [Bot] and 29 guests