Java Programming: 9 - Classes and Objects

Veröffentlicht am: 08 Juni 2011
auf dem Kanal: CodeMonkeyCharlie
164,481
1.5k

In this tutorial we learn how to instantiate objects from classes that we create. We learn about instance variables, instance methods, and constructors. Getters and setters are introduced and encouraged as good coding practice.

The static modifier is also explained.

You would usually make instance variables private when public getters/setters are provided as part of the interface, but access modifiers have not yet been covered in this series.

You can also move the main method to the Person class and keep the program for this tutorial in one file, however, I thought it would better get the concept across by having the Person class be isolated from main.


Auf dieser Seite können Sie das Online-Video Java Programming: 9 - Classes and Objects mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CodeMonkeyCharlie 08 Juni 2011 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 164,481 Mal angesehen und es wurde von 1.5 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!