Search:

Type: Posts; User: turboman1

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    1,480

    Re: 'new' instantiating command ??

    Kevin I think I am starting to get this. So let me ask another question if you have two statements like this...


    Animal myAnimal = new Mammal()

    // Versus

    Animal myAnimal = new Animal();
  2. Replies
    9
    Views
    1,480

    Re: 'new' instantiating command ??

    Kevin, in the recommended reading you posted I have a question.



    1)How is this any different than writing....

    MountainBike obj = new MountainBike()

    Since MountainBike() is a derived...
  3. Replies
    9
    Views
    1,480

    Re: 'new' instantiating command ??

    I understand this part. It is just like creating a variable of type integer ("int a"). "int a" does not actually create any memory yet, bc it is just a declaration of a variable.



    This is the...
  4. Replies
    9
    Views
    1,480

    'new' instantiating command ??

    New to this forum and java programming. Quick question about the new command when instantiating a new object.

    If you have...

    class_name object_name = new class_name(arg list)

    So on the left...
Results 1 to 4 of 4