SlideShare a Scribd company logo
Running a program Compiling A program, called a  compiler , translates the source code into machine code The CPU then executes the machine code C, FORTRAN, Pascal, COBOL, BASIC Interpreting A program, called an  interpreter,  reads the source code and executes the instructions BASIC, LISP, Perl, Python
Java Code Execution Compiler (javac) translates source code (.java file) to byte code (.class file) Byte code is machine independent Byte code is interpreted by the Java run-time program program (java), the IDE (BlueJ), the appletviewer, or the web browser. The program can be compiled on one machine and interpreted on another.
Java Pyramid Application or Applet Class Class Project Data Methods Data Instructions
Java Development JDK 1.6.20 SE Development Kit (JDK) http:// java.sun.com/javase/downloads/index.jsp Includes compiler, interpreter, and libraries BlueJ Version 3 IDE (Integrated Development Environment) Tools for designing, developing, and testing Java software. http:// bluej.org
Hello, world!! Class Methods main Comments javadocs Blocks
Classes and Objects A class is a  definition  of a (complex) data type An object is an  instantiation  of a class A Java program is a set of interacting objects Everything in Java is an object
Special method: main Methods A collection of data and  instructions Has a specific purpose public static void main(String args) The start of a Java  application It must belong to a class (We will cover  applets  after we’ve covered objects and classes)
Comments Notes to other readers of your software (including your teacher and yourself). Ignored by the machine. Two formats: “/*” starts a comment, ‘*/’ finishes it. These comments can span multiple lines. ‘//’ starts the comment, EOL (end-of-line) finishes it. Comments can be inserted anywhere, but there are some common locations.
Blocks A section of code; a set of instructions or statements. A block starts with ‘{‘, and ends with ‘}’ Blocks are written for: Method definitions Class definitions Loops  ‘then’ and ‘else’ bodies Blocks also define scope for variables.
Lab 0: Hello, world
Lab 0 debrief: What have we discovered? We created an  application  called  Hello The software was created in a folder in  My Documents  also called  Hello The folder has a file called  Hello.java  containing: A Class called  Hello The  main  method, the applications starting point. The compiler creates a file called  Hello.class  containing the program’s byte code. We were able to do everything using BlueJ

More Related Content

PPTX
Java
Abrar ali
 
PPTX
Chapter 1.3
sotlsoc
 
PDF
Lecture 3
Debasish Pratihari
 
PPT
About java
vibrantblade16
 
PPTX
Java architecture
Rakesh
 
PPT
Fundamentals of JAVA
KUNAL GADHIA
 
PPTX
Java programming(unit 1)
Dr. SURBHI SAROHA
 
Java
Abrar ali
 
Chapter 1.3
sotlsoc
 
About java
vibrantblade16
 
Java architecture
Rakesh
 
Fundamentals of JAVA
KUNAL GADHIA
 
Java programming(unit 1)
Dr. SURBHI SAROHA
 

What's hot (20)

DOC
Grade 8: Introduction To Java
nandanrocker
 
DOCX
Java and its features
Pydi Nikhil
 
PPTX
Features of JAVA Programming Language.
Bhautik Jethva
 
PPT
Java Presentation
pm2214
 
PPTX
Core java online training
Glory IT Technologies Pvt. Ltd.
 
PPTX
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
PPTX
Java features
Prashant Gajendra
 
PDF
Lec 4 06_aug [compatibility mode]
Palak Sanghani
 
PPTX
Java virtual machine
Nikhil Sharma
 
PDF
What is-java
Shahid Rasheed
 
PPTX
Chapter 1
siragezeynu
 
PPTX
Java programming course for beginners
Eduonix Learning Solutions
 
PDF
Introduction to java technology
Indika Munaweera Kankanamge
 
PDF
Core Java Tutorial
Java2Blog
 
PPTX
Jdk,jre,jvm
Kritika Goel
 
PPT
Introduction
richsoden
 
PPT
Chapter 1 introduction to java technology
sshhzap
 
PDF
Java Presentation For Syntax
PravinYalameli
 
DOCX
JDK,JRE,JVM
Cognizant
 
DOC
Java 5
mannut2001
 
Grade 8: Introduction To Java
nandanrocker
 
Java and its features
Pydi Nikhil
 
Features of JAVA Programming Language.
Bhautik Jethva
 
Java Presentation
pm2214
 
Core java online training
Glory IT Technologies Pvt. Ltd.
 
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
Java features
Prashant Gajendra
 
Lec 4 06_aug [compatibility mode]
Palak Sanghani
 
Java virtual machine
Nikhil Sharma
 
What is-java
Shahid Rasheed
 
Chapter 1
siragezeynu
 
Java programming course for beginners
Eduonix Learning Solutions
 
Introduction to java technology
Indika Munaweera Kankanamge
 
Core Java Tutorial
Java2Blog
 
Jdk,jre,jvm
Kritika Goel
 
Introduction
richsoden
 
Chapter 1 introduction to java technology
sshhzap
 
Java Presentation For Syntax
PravinYalameli
 
JDK,JRE,JVM
Cognizant
 
Java 5
mannut2001
 
Ad

Viewers also liked (7)

PPT
2 1 data
Ken Kretsch
 
PPT
Programming model
Ken Kretsch
 
PPT
1 2 java development
Ken Kretsch
 
PPT
2 1 expressions
Ken Kretsch
 
KEY
Introducing Amplify
appendTo
 
PPT
1 4 where do we get the data
Ken Kretsch
 
PPT
2 4 measures of center
Ken Kretsch
 
2 1 data
Ken Kretsch
 
Programming model
Ken Kretsch
 
1 2 java development
Ken Kretsch
 
2 1 expressions
Ken Kretsch
 
Introducing Amplify
appendTo
 
1 4 where do we get the data
Ken Kretsch
 
2 4 measures of center
Ken Kretsch
 
Ad

Similar to R:\ap java\class slides\chapter 1\1 2 java development (20)

DOCX
Unit of competency
loidasacueza
 
PPT
Java for Mainframers
Rich Helton
 
PDF
JAVA Program Examples
Prof Chethan Raj C
 
PPT
Introduction to Software Development
Zeeshan MIrza
 
PPTX
Introduction to java
Ali Baba
 
PPTX
Chapter 2.1
sotlsoc
 
PDF
Download Free Java Notes PDF for Easy Learning
Amend Ed Tech
 
PPT
Javalecture 1
mrinalbhutani
 
PDF
Java Programming Fundamentals: Complete Guide for Beginners
Taranath Jaishy
 
PPT
Java introduction
logeswarisaravanan
 
PDF
J introtojava1-pdf
Emmanuel Alimpolos
 
PPTX
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
PPT
01slide
Usha Sri
 
PPT
01slide
cdclabs_123
 
PPTX
OOP with Java
OmegaHub
 
PPTX
1_Introduction to Java.pptx java programming
amitraj53904
 
PPTX
Unit1 introduction to Java
DevaKumari Vijay
 
PDF
Java programming material for beginners by Nithin, VVCE, Mysuru
Nithin Kumar,VVCE, Mysuru
 
PPSX
Dr. Rajeshree Khande :Intoduction to java
DrRajeshreeKhande
 
PPSX
Intoduction to java
jalinder123
 
Unit of competency
loidasacueza
 
Java for Mainframers
Rich Helton
 
JAVA Program Examples
Prof Chethan Raj C
 
Introduction to Software Development
Zeeshan MIrza
 
Introduction to java
Ali Baba
 
Chapter 2.1
sotlsoc
 
Download Free Java Notes PDF for Easy Learning
Amend Ed Tech
 
Javalecture 1
mrinalbhutani
 
Java Programming Fundamentals: Complete Guide for Beginners
Taranath Jaishy
 
Java introduction
logeswarisaravanan
 
J introtojava1-pdf
Emmanuel Alimpolos
 
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
01slide
Usha Sri
 
01slide
cdclabs_123
 
OOP with Java
OmegaHub
 
1_Introduction to Java.pptx java programming
amitraj53904
 
Unit1 introduction to Java
DevaKumari Vijay
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Nithin Kumar,VVCE, Mysuru
 
Dr. Rajeshree Khande :Intoduction to java
DrRajeshreeKhande
 
Intoduction to java
jalinder123
 

More from Ken Kretsch (9)

PPT
Classical probability
Ken Kretsch
 
PPT
2 7 exploratory data analysis
Ken Kretsch
 
PPT
2 6 measure of position
Ken Kretsch
 
PPT
2 5 standard deviation
Ken Kretsch
 
PPT
2 1 frequency table
Ken Kretsch
 
PPT
2 3 depicting frequency tables
Ken Kretsch
 
PPT
\\Dc hss2\staff\kretsch k\prob and stat\class materials\chapter 1\1-4 where d...
Ken Kretsch
 
PPT
Science, invention, and engineering
Ken Kretsch
 
PPT
1 1 data
Ken Kretsch
 
Classical probability
Ken Kretsch
 
2 7 exploratory data analysis
Ken Kretsch
 
2 6 measure of position
Ken Kretsch
 
2 5 standard deviation
Ken Kretsch
 
2 1 frequency table
Ken Kretsch
 
2 3 depicting frequency tables
Ken Kretsch
 
\\Dc hss2\staff\kretsch k\prob and stat\class materials\chapter 1\1-4 where d...
Ken Kretsch
 
Science, invention, and engineering
Ken Kretsch
 
1 1 data
Ken Kretsch
 

R:\ap java\class slides\chapter 1\1 2 java development

  • 1. Running a program Compiling A program, called a compiler , translates the source code into machine code The CPU then executes the machine code C, FORTRAN, Pascal, COBOL, BASIC Interpreting A program, called an interpreter, reads the source code and executes the instructions BASIC, LISP, Perl, Python
  • 2. Java Code Execution Compiler (javac) translates source code (.java file) to byte code (.class file) Byte code is machine independent Byte code is interpreted by the Java run-time program program (java), the IDE (BlueJ), the appletviewer, or the web browser. The program can be compiled on one machine and interpreted on another.
  • 3. Java Pyramid Application or Applet Class Class Project Data Methods Data Instructions
  • 4. Java Development JDK 1.6.20 SE Development Kit (JDK) http:// java.sun.com/javase/downloads/index.jsp Includes compiler, interpreter, and libraries BlueJ Version 3 IDE (Integrated Development Environment) Tools for designing, developing, and testing Java software. http:// bluej.org
  • 5. Hello, world!! Class Methods main Comments javadocs Blocks
  • 6. Classes and Objects A class is a definition of a (complex) data type An object is an instantiation of a class A Java program is a set of interacting objects Everything in Java is an object
  • 7. Special method: main Methods A collection of data and instructions Has a specific purpose public static void main(String args) The start of a Java application It must belong to a class (We will cover applets after we’ve covered objects and classes)
  • 8. Comments Notes to other readers of your software (including your teacher and yourself). Ignored by the machine. Two formats: “/*” starts a comment, ‘*/’ finishes it. These comments can span multiple lines. ‘//’ starts the comment, EOL (end-of-line) finishes it. Comments can be inserted anywhere, but there are some common locations.
  • 9. Blocks A section of code; a set of instructions or statements. A block starts with ‘{‘, and ends with ‘}’ Blocks are written for: Method definitions Class definitions Loops ‘then’ and ‘else’ bodies Blocks also define scope for variables.
  • 10. Lab 0: Hello, world
  • 11. Lab 0 debrief: What have we discovered? We created an application called Hello The software was created in a folder in My Documents also called Hello The folder has a file called Hello.java containing: A Class called Hello The main method, the applications starting point. The compiler creates a file called Hello.class containing the program’s byte code. We were able to do everything using BlueJ