Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 1 Review-Fall 2007: Understanding Java Types

Back to Midterm Exam 1 Review-Fall 2007
Ask your questions here...


c) So static implies that an instance does not have to exist to run the method, which means that the method creates an instance itself? So would that mean that any method that is used with lines like "pic.method()" with a pic that is already an instance are not static because the instance pic is already created, right?

http://www.leepoint.net/notes-java/flow/methods/50static-methods.html - Joel Uthe

d) If pictureCollage extended Picture, that would mean that it inherited everything from Picture, but I don't really see that that's necessary. When would we want to make a class extend a class if we're not trying to protect data like PIcture does with SimplePicture?
Sorry inheritance will not be on this exam - Joel Uthe



Link to this Page