Lecture 16
5
toString in class Boolean
•Wrapper class for primitive type boolean
•From file Boolean.java in library:
•private boolean value; // field
•
•public String toString() {
•   return value ? "true" : "false";
•}
•Sun’s brace convention differs from ours
•test ? x : y   expression on next slide
Repeat slide from last lecture. Not discussed last time, so worth a minute or two now. This is literally pasted from the Java sources – most of Java is in the library, and written in Java itself.