Hi Dave, I think that's won't matter, for now. The main() method is all you need for now. That method is where everything starts, and not from the top of the code.
That "public JavaArray()" is called the default constructor of the class. Unless you're developing a Javabean or something, it has no specific purpose: It implicitly exists even if you do not find it in the code. Hugs P.S.: I'm not sure but I think the default constructor, implicit or not, is always called before the main method. Can anyone confirm it? I cannot test it here right now, but a System.out.println inside the default constructor oughta be enough to test this. On Wed, Jul 15, 2009 at 3:00 PM, DaveB <[email protected]> wrote: > > > Greetings,all: > > I am having difficulty in understanding when we need to create an instance > of a class and when we do not. > > In lab 1036, we create: > public class JavaArray > > Then immediately create an instance of that class: public JavaArray(). > > Further in that same lab, we create: > public class DaysOfTheWeek > > And we do not create an instance. > > Any clarification would be helpful. > Thx, > > DaveB > > > > -- Diogo Sales Oliveira --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
