This keyword defines a method that doesn’t return a value.
What is void?
This keyword is used to create a new object.
What is new?
This loop runs as long as the condition remains true, and checks the condition before each iteration.
What is a while loop?
The index of the first element in any Java array.
What is 0?
This method returns the number of characters in a string.
What is length()?
Java is known for using this programming paradigm.
What is object-oriented programming?
This type of method belongs to the class rather than an instance.
What is a static method?
This loop is best used when you know exactly how many times to repeat.
What is a for loop?
This exception is thrown when you try to access an index that doesn’t exist.
What is ArrayIndexOutOfBoundsException?
This method converts a string to all uppercase letters.
What is toUpperCase()?
The name of the method that serves as the entry point of every Java program.
What is main?
This special method often comes first when designing a class.
What is a constructor?
This keyword exits a loop prematurely.
What is break?
You declare an array of 10 integers named "nums" like this.
What is int[] nums = new int[10];?
This method checks if two strings are exactly equal.
What is equals()?
This type holds whole numbers.
What is int?
This type of method lets you access the value of a private field.
What is a getter?
This keyword skips the rest of the current iteration.
What is continue?
You use this loop to iterate through each element in an array without using indices.
What is a for-each loop?
This method finds the position of a character or substring.
What is indexOf()?
This symbol is used to indicate a single-line comment.
What is //?
This principle hides data inside a class and makes it accessible through methods.
What is encapsulation?
This type of loop runs at least once, regardless of the condition.
What is a do-while loop?
This method is used to sort an array.
What is Arrays.sort()?
This method extracts a portion of a string.
What is substring()?