Please enable JavaScript.
Coggle requires JavaScript to display documents.
classes, objects, and encapsulation (constructors (you pass it params…
classes, objects, and encapsulation
-
-
Instantiating Objects
-
-
TIP: if you declare something private and you go to use a method in a built in class in java then it WILL NOT run
-
Types of Meths
-
Non-static meths - also known as instance meths, they mean that you must instantiate an obj for the class before you can use the meth
-
-
mutator meth
changes vals in a meth & normally ris void - normally takes a param that will change an instance var
-
-
-
constructors
-
-
-
-
by default all instance vars nums are set to 0, boolean to false, and objs to void
NOTE: nothing returns without main meth - best thing to do is to save two diff files, one with all the meths and objects and another with main
-