This keyword is used to specify that a method does not return a value. It is often used for methods that perform action.
void
This keyword is used to declare a variable that cannot be changed once it has been assigned.
final
In Java, this keyword is used to create an instance of a class, also known as an object.
new
What is the return type of the following method: public static int myMethod(int count, double value).
Int
This method returns the character in a string at a certain index.
.charAt()
This is the default access modifier in java.
package
This type of variable in Java holds a single piece of data that can be modified during the execution of the program and is often used to store temporary values or objects that change throughout the program's lifecycle.
local
This is the term used to describe the process of creating an object from a class.
instanciating
In java, this special type of method instantiates a new class. It is called once during object creation.
Constructor
.equals() compares the actual string value while == compares the ___________?
Memory addresses
This mechanism in Java automatically reclaims memory that is no longer in use, eliminating the need for manual memory management and preventing memory leaks.
Garbage collector
Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
long
This type of method, defined within a class, can be called without creating an instance of the class.
static method
In the following method declaration, how many formal parameters are there?public static double squareRoot(double value) { return 2.3;}.
1
What method returns a value <0 if this is less than the parameter; returns zero if this is equal to the parameter; returns a value >0 if this is greater than the parameter.
This type of exception in Java is thrown when a method tries to access an object that is null, and the object reference has not been initialized.
NullPointerException
This type of variable stores memory addresses.
Reference variable
In Java, this keyword is used to refer to the current instance of a class within its own methods and constructors.
this
The restrictions on what methods, variables, and keywords a static method cannot access within the class.
this, super, non-static methods and variables
These 3 "replace" methods will all return the same value if there is only 1 appearance of the substring you would like to replace.
.replace(), replaceAll(), .replaceFirst()
Is java a pure object oriented programming language.
No, supports primitive data types
The similarity between false, 0.0, and "".
default values
The statement to initiate an int object of value 1.
Integer x = new Integer(1);
When are the static initialization blocks stored in the memory?
During class loading
This method, which takes no parameters, turns "Hello World! " into "Hello World!"
.trim()