JAVA Introduction
JAVA Introduction
Java Foundations:
Introduction to Programming and Data Structures
by John Lewis,
Peter DePasquale and Joseph Chase
class body
public class
Lincoln3
{
public
static
void
main
(
String
[]
args )
{
System.out.println (
"A quote by Abraham Lincoln:" )
; System.out.println
(
"Whatever you are, be a good one."
)
;
}
}
Java source
code Java
bytecode
Java
compiler
Bytecode Bytecode
interpreter compiler
Machine
code
Edit and
save program
errors
errors
Compile program
• These steps also are never purely linear and often overlap
and interact
• An object has
– state - descriptive characteristics
– behaviors - what it can do (or what can be done to it)
Charge Bank
Account Account
Savings Checking
Account Account
• Chapter 1 focused on
– programming and programming languages
– an introduction to Java
– program development activities
– problem solving
– an overview of object-oriented concepts