1/201
Flashcards about the core concepts of Java programming
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Program / Software
A set of step-by-step instructions that tells your computer what to do and produce the results you want.
Programming Language (PL)
A set of rules that tells a computer what operations to perform.
Java
An object-oriented, class-based, secured, and general-purpose programming language.
OAK
The first official name of Java.
JDK (Java Development Kit)
A Java software development environment from Oracle. It includes the JVM, compiler, debugger, and other tools for developing Java.
JRE (Java Runtime Environment)
A software layer that runs on top of a computer’s operating system software and provides the class libraries and other resources that a specific Java program needs to run.
JVM (Java Virtual Machine)
An engine that provides a runtime environment to drive the Java Code or applications. It converts Java bytecode into machine language. JVM is a part of Java Run Environment (JRE).
API (Application Programming Interface)
A list of all classes that are part of the Java development kit (JDK)
Bytecode
Program code compiled from source code into low-level code designed for a software interpreter.
Compiler
A program that converts instructions into a machine code or lower-level form so that they can be read and executed by a computer.
Interpreter
A computer program that converts high-level program statements into Assembly Level Language.
Just-In-Time (JIT) compiler
A component of the Java Runtime Environment that improves the performance of Java applications at run time.
Platform
Any hardware or software environment in which a program runs.
Java
High-level, multi-platform, robust, object-oriented, concurrent, secured, and general-purpose computer programming language.
Types of Java Applications
Desktop Applications, Web Applications, Enterprise Applications, Mobile Applications
Web application technologies in Java
Servlets, JSP, Spring, Hibernate
Java SE (Java Standard Edition)
A Java programming platform that includes core topics like OOPs, String, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc.
Java EE (Java Enterprise Edition)
An enterprise platform mainly used to develop web and enterprise applications; built on top of Java SE.
JavaFX
It is used to develop rich Internet applications. It uses a lightweight user interface API.
Java ME (Java Micro Edition)
A micro platform that is mainly used to develop mobile applications
Object-oriented programming (OOP)
Simplifies software development and maintenance by providing some rules like Encapsulation, Inheritance. Polymorphism and Abstraction
Classloader
Part of the Java Runtime Environment(JRE), which dynamically loads Java classes into the Java Virtual Machine.
Bytecode Verifier
Checks the code fragments for illegal code violating access rights to objects.
Security Manager
Determines what resources a class can access, such as reading and writing to the local disk.
Automatic garbage collection
Runs on the Java Virtual Machine to eliminate objects no longer being used by a Java application.
Java Development Kit (JDK)
A software development environment used to make applets and Java applications. It contains tools required to write Java programs and JRE to execute them.
Java Virtual Machine (JVM)
Provides a platform-independent way of executing Java source code and comes with JIT (Just-in-Time) compiler that converts Java source code into low-level machine language.
Java Runtime Environment (JRE)
Contains the class libraries, loader class, and JVM; needed to run Java programs.
ClassLoader (JVM Architecture)
A subsystem used for loading class files and performs three major functions: loading, linking, and initialization.
Method Area (JVM Architecture)
Stores class structures like metadata, the constant runtime pool, and the code for methods.
Heap (JVM Architecture)
All the Objects, their related instance variables, and arrays are stored.
JVM language Stacks (JVM Architecture)
Stores local variables and their partial results and created simultaneously as the thread is created.
PC Registers (JVM Architecture)
Stores the address of the Java virtual machine instruction that is currently being executed.
Native Method Stacks (JVM Architecture)
Holds the instructions for the native code depending on the native library. It is written in another language instead of Java.
Native Method interface (JVM Architecture)
Allows Java code running in a JVM to be called by libraries and native applications.
Native Method Libraries (JVM Architecture)
A collection of the Native Libraries(C, C++) needed by the Execution Engine.
Local Vars
vars defined inside methods, constructors or blocks, and will be be destroyed after completion
Instance vars
vars within class but outside any method. can be accessed inside any class’s method, constructor or block.
class vars
are declared within a class, outside any method with the static keyword
primitive datatypes
basic types of data, and stores actual values
Reference types
are instantiable calss and arrays , store addresses to locations in memory, also known as wrapper classes
Class loader
is the JVM subsystem used to load class files
Bytecode verifier
checks the code fragments for illegal code that can violate access rights to objects
Interpreter
Read the bytecode stream then execute the instructions
Syntax
are set of rules in programming
Comment
used to document a particular code or program and the compiler does not read it.
Phase1: edit
create the program on the editor and after that it is stored in the disk with the names ending .java
phase 2: Compile Javac
a compiler translates from high level language program to bytecodes and stores them in disks with the ending name .class
Phase 3:load
Class loader compiles and put those byte codes from disk to primary memory
Phase 4: verify
Verify bytecodes to confirm that all byte codes are valid and do not rik Java’s security restrictions
Phase 5 execute
JVM read and translates those bytecodes into a language the computer can understand, then execute the program and store its values in primary memory
class keyword
used to declare a class in java
public
an access modifier that represents visibility, it means that it is visible to all
static
the core advantage of it is that there is no need to create an object to invoke the ___ method
void
the return type of the method, it means that it doesnt return any value
main
represents the starting point of the program
String[] args
is used for command line argument
System.out.println()
used to print statements.
syntax error
will happen if a specific rule is not being followed
identifiers
the names given to entities sych as class,vars, and functions
keywords
are identifiers that have special meanings for the compiler
abstract
specifies that the class is abstract
boolean
this data type specifier mentions taht a particular var is boolean
byte
stipulates a specific byte type var
case
specifies the program to be performed if a particular case is satisfied
catch
during a throw case of error handling, encloses actions to be performed if an exception occurs
break
breaks the control out of a loop
void
renders a method non returnable
char
specifies that the var is of character type
class
specifies the creation fo a new class followed by its name
extends
used to indicate theat the class mentioned after it is the derivation of a superclass
Literals
indentifiers that have a particular value in themselves
Decimal
any number base 10
binary
any number base 2
octal
any number base 8
hexadecimal
any nuber base 16
floating poing decimal
numeric values only using a decimal point. represent fractional numbers
character literals
are literals that deal with characters
single quoted character
all unilength characters enclosed within single quotes
escape sequences
characters preceded by a backlash
unicode representation
represented by \u
comments
are needed whenever the developer needs to add documentation
//
singleline documentation
/* */
multiline documentation
/** */
documentation comment
unicode
is universal international standard character encoding capable of representing most of the worlds written languages.
ASCII
American Standard code for information interchange
Widening
converting one type having a lower type into a higher type
Narrowing
converting higher datatype to a lower data type
Typecasting
when you assign a value of one primitive datatype to another type
Parsing
used to convert the value of one data type to the value of another data type
Concatenation
joining two strings together
JOptionpane
simple way to make a UI component
showMessageDialog()
allows for only a message and an OK button
showConfirmDialog()
allows for various combinations of OK,YES,NO, and CANCEL BUTTON
showOptionDIalog()
will enable you to display buttons containing text of your choice.
showInputDialog()
allows the user to enter arbitrary information in a text field or with a combo box list of values. It provides only OK and CANCEL buttons
Sequence
an action or event leads to the next ordered action in predetermined order.
Branching
altering the flow of program execution by making a selection or choice
Looping
Altering the flow of porgram execution by repetition of the statements()