Fundamentals of Java Programming
Fundamentals of Java Programming
Fundamentals of Java
Programming
Computers and Computer Programming
Writing and Executing a Java Program
Elements of a Java Program
Features of Java
Accessing the Classes and Class
Members
The Memory Usage by a Java Program
When Will the Error Occur?
Understand how computers and computer
programs work.
Understand how a Java program is written,
compiled, and executed.
Understand what makes Java platform
independent.
Identify the object-oriented features of Java.
Identify different elements of a Java program:
primitive variable, reference variable, local
variable, instance variable, method, and
class.
Identifywhere in memory the method
invocations, objects, and variables are
stored.
Understand how access modifiers define
the accessibility of classes and class
members.
Understand the concepts of early binding
and late binding in the context of program
errors.
How a Computer Works
How a Computer Program Works
From a computer program’s perspective, a
computer consists of components to do the
following:
• Receive data from a user
• Process the data according to instructions from a
program or a user
• Place the results somewhere
Places to Store Data:
• Permanent storage: hard drive
• Temporary storage: RAM
The
executable code is machine
dependent
In
Java, the compiler compiles the source
code into bytecode
javac RobotManager.java
Executing
a Java program by issuing the
java command:
Object-Oriented Programming
“write once, run anywhere.”