RU beehive logo ITEC dept promo banner
ITEC 120
2019fall
asbrennem
ibarland

constructors; named constants
Mysteries Revealed!


1 Note how we're declaring and initializing on the same line; we'll need that fact in a moment.      
2 Well, actually Java tries to re-use literally defined Strings, so if your program contains the String literal "hello" five times, it only calls a String constructor once (and at compile-time, not run-time).      
3 Why on earth would you ever want to treat an int as an object? Because some functions can work on any Object. For example, toString and equals actually work on any Objects!      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.