NEW
Font size
WorksheetsPreTrainingClassesObjectsMethods
Total questions: 10
Worksheet time: 8mins
What are Objects?
Blueprints detailing the states and behaviors of objects
Any entity with states and behaviors
A coordinated set of instructions which can return a value or void depending on it's return type
What are Methods?
Blueprints detailing the states and behaviors of objects
Any entity with states and behaviors
A coordinated set of instructions which can return a value or void depending on it's return type
What are classes?
Blueprints detailing the states and behaviors of objects
Any entity with states and behaviors
A coordinated set of instructions which can return a value or void depending on it's return type
It's best practice for all classes to have ____.
Their own .java file
A main method
The final access modifier
The abstract keyword
The main method has a very particular signature. It must look like ____
void main(String[] args)
public static main(String[] args)
public static void main(String[] args)
What portion of the main method's signature can be changed?
public static
void
main
String[] args
What is included in a method declaration, but not a method invokation?
access modifiers
parameter datatypes
a code block
all of the above
In Java, class names should be written in ___, method names should be written in ___.
camelCase, PascalCase
PascalCase, camelCase
snake_case, SCREAMING_SNAKE_CASE
To access a method or variable from within an object, we use ___
Dot notation
Square bracket notation
Parenthesis notation
up arrow notation
What is a main method?
The only place we can write code
The starting point for the program
The only method we can put in the main class
