Holy Java Moly Flashcards
JVM
abstract machine. a specification that provides runtime environment in which bytecode can be executed
JRE
runtime environment which implements JVM and provides all class libraries and oter files taht JVM uses at runtime
JDK
tool necessary to compile, document and package Java programs. completely includes JRE
Synchronization
process which keeps all concurrent threads in execution to be in sync. avoids memory consistency errors caused due to inconisistent view of shared memory
Thread
path of execution for a process. can run concurrently and is controlled by programmer compared to processes
Wrapper Classes
each of java’s 8 primitive data types has a class dedicated to it. they “wrap” primitive data type into an object of that class.
The 8 Primitive Types
boolean, byte, char, int, float, double, long, short
Boxing
constructing the object
unboxing
extracting value from object.
autoboxing
converting primitive type to wrapper
OOPS
objects. can also pass by reference primitives
final
used to apply restrictions on class, method and variable. class can’t be inherited, method can’t be overridden and variable value cant be changed
finally
used to place important code, it will be executed whether exception is handled or not
finalize
used to perform clean up processing just before object is garbage collected. gc throws away objects that are no longer used. override finalize to utilize
StringBuffer
operations are thread-safe and synchronized. to be used when multiple threads are working on same String and StringBuilder in single threaded environment.