manipulate
handle or control
manipulate
handle or control
inspect
look at closely
paradigm
pattern or model
Adding Lower Type
Java promotes smaller data types (i.e., byte, short, and char) to int for arithmetic operations to prevent overflow issues. This process is called type promotion.
enumeration.
fixed number of possible values for a variable (e.g., days of the week, directions, etc.).
compile
A compiler and an interpreter are both computer programs that convert high-level programming language code into machine code. However, they differ in how they translate the code and how they run: Compiler Translates the entire source code into machine code before the program runs. This results in faster execution because no translation is required during execution. Compilers are ideal for high-performance applications. Interpreter Translates the code line-by-line as the code runs. Interpreters are well-suited for rapid development, debugging, and situations where there is a need for platform independence.
Statements
an instruction that tells the computer to perform a specific action
directive
something that serves to direct, guide, and usually impel toward an action or goal
delimiter
A delimiter is a character or symbol that separates data, words, phrases, lines, or code snippets.
is created
function sayHi(name) {
alert( Hello, ${name} );
}
sayHi("John"); // Hello, John
subtle
nice
Callback functions
What: A callback function in JavaScript is a function passed as an argument to another function, which is then executed after the completion of that function.
Why: Asynchronous Operations: JavaScript uses callbacks to handle asynchronous tasks like API calls, timers, or file reading. Code Modularity: Callbacks allow for cleaner, reusable, and more maintainable code by delegating operations to specific functions. How: You define a callback function and pass it as a parameter:
javascript Copy code function greet(name, callback) { console.log('Hello, ' + name); callback(); }
function sayGoodbye() { console.log('Goodbye!'); }
greet('Alice', sayGoodbye); Here, sayGoodbye is passed as a callback to greet, and gets executed after the greeting.
You said: output ChatGPT said: ChatGPT The output of the provided code would be:
Copy code Hello, Alice Goodbye! Explanation: The greet function is called with "Alice" and the sayGoodbye function as arguments. Inside greet, it first logs "Hello, Alice". After that, it calls callback(), which refers to sayGoodbye, and the sayGoodbye function logs "Goodbye!".
multithreaded code.
Multithreaded code is code that allows multiple threads (smaller units of a process) to run concurrently. In a multithreaded program, different threads can execute code simultaneously, allowing tasks to be performed in parallel, which can improve performance, especially in multi-core systems.
asynchronously.
not existing or occurring at the same time.
serialization
Serialization in Java is the process of converting an object into a byte stream so it can be easily stored or transmitted (e.g., saved to a file, sent over a network). The byte stream can later be deserialized back into a copy of the original object.
Checked exceptions
Checked exceptions are exceptions that are checked at compile-time. These exceptions must be either caught using a try-catch block or declared in the method signature using the throws keyword. The compiler enforces handling of these exceptions to ensure robust error handling.
propagated
spread and promote (an idea, theory, etc.) widely.
enum:
Enum, or enumeration, is a data type that represents a set of named values, or constants, that are associated with integral values.
several
more than two but not many.
unsigned
not having a plus or minus sign, or a bit representing this.
$JAVA_HOME/jre/lib/ext directory
What: The $JAVA_HOME/jre/lib/ext directory was a location in older Java versions (pre-Java 9) where you could place external JAR files (libraries). These libraries were automatically included in the Java runtime's classpath without explicit configuration.
Why: It was used to easily extend the Java Runtime Environment (JRE) with additional libraries or APIs, such as third-party tools or extensions.
How: To use it, you would simply drop your JAR files into the ext directory, and they’d be available to any Java application running on that JRE.
Status: Deprecated in Java 9 and later due to the introduction of the Java Platform Module System (JPMS). Now, external libraries must be added explicitly via classpath or module path.
jar files
A JAR file is a file that contains a compressed version of .class files, audio files, image files, or directories.
rt.jar
rt. jar stands for runtime and contains all of the compiled class files for the core Java Runtime environment.
Native Method
Native methods in Java are methods that are written in a language other than Java, such as C or C++
abstract
existing in thought or as an idea but not having a physical or concrete existence.
>>
Arithmetic Right Shift >> or Signed Extension
>>>
Logical Right Shift >>> or Zero Extension.
>>>
This >>> logical right shift ignores the sign and fill all the left empty positions with zero.
>>> changes parity bit (MSB) to 0
//10*2^3=10*8=80
Left shift val * 2^n ( 10 << 2) val = 10, n = 2 Right shift val / 2^n ( 10 >> 2) val = 10 , n=2
encoding
convert into a coded form.
two's complement integer.
Java's byte data type is a two's complement integer (two's complement is a way of representing positive and negative integers with bits). The two's complement value of 11111101 is -3, so to store that byte inside a byte variable, I assigned -3 to it.
Two's complement uses the binary digit with the greatest value as the sign to indicate whether the binary number is positive or negative; when the most significant bit is 1 the number is signed as negative and when the most significant bit is 0 the number is signed as positive.
(inclusive).
1 to 10 inclusive is 1,2,3,4,5,6,7,8,9,10. 1 to 10 exclusive is 1,2,3,45,6,7,8,9.
complement
a thing that contributes extra features to something else
'