What is maven used for?
To organize, compile, and run Java projects
What are the different possible access modifiers?
Public, private, protected
What is encapsulation?
Enclosing fields and methods together in a class
What happens when one class extends another?
It inherits all accessible state and behavior
What does UML stand for?
Unified Modeling Language
True or false: A return type always has to be declared even when nothing is returned
True (void)
What do curly braces indicate?
Scope / a block of statements
What is an enum?
A set of named constants
What is an abstract method?
Does not have a body and declares itself as abstract
What does the 'final' modifier indicate?
The variable cannot be changed (once assigned)
What is the benefit of bytecode?
Easier to interpret into machine instructions than sourcecode
What are the two ways to handle a checked exception?
Using a try/catch or a throws declaration
What is a default constructor and how do you call it?
Called using new to create an instance of the class with no parameters
What is a functional interface (and what is it for?)
An interface with only one method; similar to functions
What is overloading?
Having multiple methods with the same name; used commonly with constructors
What objects used to read and write from a file are constructed with FileReader and FileWriter?
Scanner and PrintWriter
What does static mean?
[The method or field] belongs to the class itself
In a UML with one class that uses another class, which direction does the arrow point?
Towards the class being used
What distinguishes an interface from an abstract class?
Only abstract methods, is implemented (not extended), and any amount of interfaces can be implemented
How do indicate that a method is abstract in UML?
Italics
When are syntax & runtime errors reported in Java?
Syntax reported when compiled to bytecode, runtime reported at execution
What common error in Python does not exist for Java?
Indentation Error
In order to associate additional values with each value in an enum, what has to be changed/added?
Declare fields and a constructor. You can also add methods if you wish
Write an example enum for bonus points :)
Write a lambda given the following functional interface:
public interface Friend { int rob (int friendBankBalance); }
Friend robbed = (friendBankBalance) -> friendBankBalance / 2;
Where is Jennie from?
WASHINGTON STATE BABYYYYYY