Object
An instance of a class in Java, possessing states and behaviors.
Class
A blueprint or template for creating objects in Java.
State
Represents the characteristics or properties of an object, often stored in fields in Java.
Behavior
Represents the actions or functionalities of an object, often implemented as methods in Java.
Static Method
A method in a class that can be called directly from the class without creating an object instance.
Non-Static Method
A method in a class that requires an object instance to be created before it can be called.
Constructor
A special method used for initializing objects, often used to pass data during object creation.
Parameter
A type of variable in a method that allows data to be passed to the method when it is called.
Return Type
Specifies the type of data that a method should return after execution.
Method
A block of code that can be called from another part of the program, often used for code reusability and organization.
Primitive Type Variables
Variables that directly hold data values and are stored on the stack.
Stack
A memory structure where primitive type variables are stored and managed.
Scope
The region of code where a variable is accessible and can be referenced.
Lifetime of Variables
The duration for which a variable exists in memory before being destroyed.
Parameters
Variables in a method definition that receive values when the method is called.
Escape Sequences
Special sequences used to represent certain characters inside a string.
String Class
A class in Java used to work with text data, internally represented as an array of characters.
String Pool
A memory area in Java where string literals are stored to optimize memory usage.
.equals Method
A method in the String class used to compare the content of two strings.
Immutable
In the context of strings, it means that the content of a string cannot be changed once it is created.
String
A sequence of characters used to represent text. In Java, strings are objects that are immutable, meaning they cannot be changed once created.
Reference Variable
A variable that stores the memory address of an object rather than the actual value of the object itself.
.equals()
A method in Java used to compare the content of two strings to determine if they are equivalent.
.equalsIgnoreCase()
A method in Java used to compare the content of two strings while ignoring differences in capitalization.
.length()
A method in Java used to find the number of characters in a string.
.substring()
A method in Java used to extract a portion of a string based on the specified indices.
.compareTo()
A method in Java used to compare two strings lexicographically based on their Unicode values.
Math Class
A class in Java that contains various mathematical functions and constants.
Static Method
A method in Java that belongs to the class itself rather than to instances of the class.
Math.abs()
A method in the Math class used to return the absolute value of a number.
Math.pow()
A method in the Math class used to calculate a number raised to the power of another number.
Math.sqrt()
A method in the Math class used to calculate the square root of a number.
Math.PI
A public constant in the Math class representing the mathematical constant pi.
Math.random()
A method in the Math class used to generate random numbers between 0.0 (inclusive) and 1.0 (exclusive).
Scanner Class
A class in Java used for taking input from the user in the console.
new Scanner(System.in)
Initializing a Scanner object to read input from the console.
.nextDouble()
A method in the Scanner class used to read a double input from the console.
.nextInt()
A method in the Scanner class used to read an integer input from the console.
.nextBoolean()
A method in the Scanner class used to read a boolean input from the console.
.next()
A method in the Scanner class used to read the next token (word) from the input.
.nextLine()
A method in the Scanner class used to read the entire line of input.
Scanner class
A class in Java that allows the user to read input of various types from the console.
.next()
A method in the Scanner class that reads the next token of input as a string.