Introduction to Java
Programming Language
Classes and Objects
A class is a blueprint for creating objects in Java
An object is an instance of a class
Instance Variables
Variables defined in a class, but not declared
as static are instance variables
Each object of a class has its own copy of
instance variables
Arrays in Java
A single-dimensional array holds several values of
the same type
A multi-dimensional array is an array of arrays
Array Memory Allocation
Array memory is allocated in a contiguous block
this Keyword and Method Parameters
this keyword is a reference to the current object
Method parameters are local variables
Java Class and Compilation Process
Java source code ( .java ) is compiled into
bytecode ( .class )
, Bytecode is executed by the Java Virtual Machine
(JVM)
Package and Access Modifiers
Access modifiers determine the access level of
fields and methods
public , private , protected , and the default
(package-private) access modifier
Java Namespaces and Package
Management
Packages provide a way to organize and access
classes
Packages also help avoid naming conflicts
Java Hello World Example and Entry Point
public static void main(String[] args) is
the entry point for a Java application
Abstract Classes and Abstraction
Abstract classes cannot be instantiated
Abstraction is the process of hiding
implementation details
Final Keyword
The final keyword can be applied to variables,
methods, and classes
A final variable cannot be reassigned
A final method cannot be overridden
Programming Language
Classes and Objects
A class is a blueprint for creating objects in Java
An object is an instance of a class
Instance Variables
Variables defined in a class, but not declared
as static are instance variables
Each object of a class has its own copy of
instance variables
Arrays in Java
A single-dimensional array holds several values of
the same type
A multi-dimensional array is an array of arrays
Array Memory Allocation
Array memory is allocated in a contiguous block
this Keyword and Method Parameters
this keyword is a reference to the current object
Method parameters are local variables
Java Class and Compilation Process
Java source code ( .java ) is compiled into
bytecode ( .class )
, Bytecode is executed by the Java Virtual Machine
(JVM)
Package and Access Modifiers
Access modifiers determine the access level of
fields and methods
public , private , protected , and the default
(package-private) access modifier
Java Namespaces and Package
Management
Packages provide a way to organize and access
classes
Packages also help avoid naming conflicts
Java Hello World Example and Entry Point
public static void main(String[] args) is
the entry point for a Java application
Abstract Classes and Abstraction
Abstract classes cannot be instantiated
Abstraction is the process of hiding
implementation details
Final Keyword
The final keyword can be applied to variables,
methods, and classes
A final variable cannot be reassigned
A final method cannot be overridden