Life long sharing . . .

Java – Objects and Classes

Posted on: November 20, 2015

This site has a good lesson for Java – Objects and Classes: http://www.tutorialspoint.com/java/java_object_classes.htm.

objectclass

Another important exam note to remember is: the 3 ways to create an object from a class:Lesson2-note2

Quiz: From the code below, which object is created by Declaration? Instantiation? Initialization ?

Lesson2-code2

Advertisements

1 Response to "Java – Objects and Classes"

Declaration : Puppy myPuppy3;
Instantiation : Puppy myPuppy2 = new Puppy();
Initialization : Puppy myPuppy1 = new Puppy(“tommy”);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

November 2015
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 180 other followers

%d bloggers like this: