*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java Rules and Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java Rules and Exceptions" Watch "Java Rules and Exceptions" New topic
Author

Java Rules and Exceptions

John Held
Greenhorn

Joined: Jun 13, 2002
Posts: 13
It seems like one of the difficulties in fully understanding Java is that it is difficult to find an organized list of Java's rules--and then
the exceptions to the rule.
Does anyone know of such an organized list?
Here is an example of what I'm talking about:
Rule: a switch argument can be anything smaller or equal to an int
Exception: if one of the case statements contains a number larger than the type of switch argument, we have a compiler error
Example:
byte a = 7;
switch (a) {
case 128:
System.out.println("We have a problem here.");
break;


John Held
Brian Lugo
Ranch Hand

Joined: Nov 10, 2000
Posts: 165
You may want to refer to the Java Language Specification:
http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html
I hope this helps,
Brian
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Rules and Exceptions
 
Similar Threads
EL Relational Operators
Rule Roundup game - question #135 arguable wording
Overriding Fragments
JavaBean Listener Naming Rules?
how to skip exception in a while loop