Java Usage
Java Syntax
Class Basics
Inheritance
Misc
100

What is maven used for?

To organize, compile, and run Java projects

100

What are the different possible access modifiers? 

Public, private, protected

100

What is encapsulation? 

Enclosing fields and methods together in a class

100

What happens when one class extends another?

It inherits all accessible state and behavior 

100

What does UML stand for?

Unified Modeling Language 

200

True or false: A return type always has to be declared even when nothing is returned

True (void)

200

 What do curly braces indicate?

Scope / a block of statements

200

What is an enum? 

A set of named constants 

200

What is an abstract method? 

Does not have a body and declares itself as abstract 

200

What does the 'final' modifier indicate? 

The variable cannot be changed (once assigned)

300

What is the benefit of bytecode? 

Easier to interpret into machine instructions than sourcecode 

300

What are the two ways to handle a checked exception? 

Using a try/catch or a throws declaration 

300

What is a default constructor and how do you call it? 

Called using new to create an instance of the class with no parameters 

300

What is a functional interface (and what is it for?) 

An interface with only one method; similar to functions

300

What is overloading? 

Having multiple methods with the same name; used commonly with constructors

400

What objects used to read and write from a file are constructed with FileReader and FileWriter? 

Scanner and PrintWriter

400

What does static mean?

[The method or field] belongs to the class itself

400

In a UML with one class that uses another class, which direction does the arrow point? 

Towards the class being used 

400

What distinguishes an interface from an abstract class?

Only abstract methods, is implemented (not extended), and any amount of interfaces can be implemented

400

How do indicate that a method is abstract in UML? 

Italics

500

When are syntax & runtime errors reported in Java?

Syntax reported when compiled to bytecode, runtime reported at execution

500

What common error in Python does not exist for Java? 

Indentation Error 

500

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 :) 

500

Write a lambda given the following functional interface:
public interface Friend { int rob (int friendBankBalance); }

Friend robbed = (friendBankBalance) -> friendBankBalance / 2; 

500

Where is Jennie from?

WASHINGTON STATE BABYYYYYY