Exam Preparation Angela Flashcards
Proper names of Classes State and Behaviour
Fields, and Methods
Creating an object from a class
Type name = new Constructor()
During inheritance what does the subclass inherit from the superclass
Non private Fields and Methods
Name 3 main errors and what they are
Syntax (compile time error), Runtime (java error thrown), and Logical (programmer error)
What are the two steps of Static typing
Declaration (Car c), Initalization (= new Car)
What does marking something as final mean
No changes can be made after compilation
What’s special about Final lists
The internals can be changed (add, remove, etc) however a new list can not be made from a list declared final
What is the format for the Ternary operator
Variable x = (boolean expression) ? resultIfTrue : resultIfFalse
Static Method use
result = math.ceil(parameters)
Local Method use
resultVar = name(parameters)
Object methods use
obj.name(parameters)
Requirements to overload a Method or Constructor
Type, order, and number of parameters
T/F a(obj) == b.clone(obj)
True, objects yes
T/F a[] {…} == b.clone[] {…}
False, values like in no
Public visibility
All places can access public