CPSC 2150 - DAY 6 SEPTEMBER 6, 2016 ================================================================================ PROCEDURAL VS. OOP ------------------ programs are a collections of objects vs. collection of subroutines Declaration and definition of method are in the same file. member variables - class variable local variable - method variable static variables belong to the class, not the instance of the class. static members cannot access instancce members .multiple instances possible, you can't know which one Do not access static members through object references use class name.static variable for enhanced readability System is a class in the Java library .Out is a static field of System(avaliable from class) .println is an overloaded method in printstream static method - a method that you can call without instantiating a class args: an array of command-line argument (args is just Java convention) final: is similar to const. means the field cannot change. Magic number - a number that's not explained in the code. enums - for finate number of legal values enum Suits{ CLUBS, DIAMONDS, HEARTS, SPADES } package directly corresponds to folder structure must appear at the top of the file