![]() |
![]() |
|
Note: To access your U: drive from home / off-campus: see the post on the course's D2L discussion-board.
Remember that in lab intro, we made a folder “itec120” in our U: drive, for all the notes & files for this course.
Object120.java. To add it to your BlueJ project:
Tip: In the code pad, pressing up-arrow key will scroll through previous expressions — very handy when you want to make slight changes.
at index 0.
the first characterto mean what most humans would call the second character; this is too confusing. So we'll stick with saying that the
second characteris
at index 1.)
System.out.println( "Computing: " + charAt(toUpperCase("howdy"), 2) ); System.out.println( "Expected: ???" ); |
Note: When calling a function likecharAt : In the code-pad, we need to type its full name,. But inside your class, you may omit it (though certainly may still include it, if that consistency makes more sense to you). If you're curious about the Java's reasoning behind this: We're allowed to omit the full-name inside the class, because (a) code insideObject120.charAt class Pizzeria is already on a first-name basis with all functions in the same class; you don't need to specify the full name, and (b) because, everything that isclass Pizzeria extends Object120 Object120 knows is also known byPizzeria 1.
meansPizzeria extends Object120
Every. ↩Pizzeria is anObject120 , although not vice versa.
This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarland ![]() |