1.introduction To Java
1.introduction To Java
PROGRAMMING
WITH JAVA
August 6, 2009
INTRODUCTION TO JAVA
August 6, 2009
August 6, 2009
August 6, 2009
August 6, 2009
Security
August 6, 2009
August 6, 2009
Bytecode is
instructions
by the Java
called the
(JVM)
August 6, 2009
August 6, 2009
August 6, 2009
10
August 6, 2009
11
August 6, 2009
12
August 6, 2009
13
August 6, 2009
14
The use of bytecode enables the Java runtime system to execute programs much faster
than you might expect
August 6, 2009
15
August 6, 2009
16
Simple
Secure
Portable
Object-oriented
Robust
Multithreaded
Architecture-neutral
Interpreted
High performance
Distributed
Dynamic
August 6, 2009
17
Simple
If you already understand the basic concepts
of object-oriented programming,
Java will be even easier
learning
August 6, 2009
18
Object oriented
August 6, 2009
19
Robust
August 6, 2009
20
August 6, 2009
21
Java
virtually
eliminates
these
problems by managing memory
allocation and deallocation for you
Java
provides
exception handling
August 6, 2009
object-oriented
22
Multithreaded
August 6, 2009
23
Architecture-Neutral
August 6, 2009
24
Java
programs by compiling into an intermediate
representation called Java bytecode
25
Distributed
August 6, 2009
26
Dynamic
August 6, 2009
27
An Overview of Java
August 6, 2009
28
Object-oriented programming is at
the core of Java
August 6, 2009
29
August 6, 2009
30
August 6, 2009
31
August 6, 2009
32
August 6, 2009
33
August 6, 2009
34
August 6, 2009
35
August 6, 2009
36
37
C:\>javac Example.java
38
39
40
41
August 6, 2009
42
43
August 6, 2009
44
Lexical Issues
Whitespace:
Java is a free-form language
In Java, whitespace is a space, tab, or
newline
Identifiers:
- Identifiers are used for class names,
method
names, and variable names
- Java is case-sensitive
August 6, 2009
45
August 6, 2009
46
Literals:
A constant value in Java is created by
using a literal representation of it
August 6, 2009
47
Comments
There are three types of comments defined by
Java.
Single-line and multiline
The third type is called a documentation comment
This type of comment is used to produce an HTML
file that documents your program
The documentation comment begins with a /**
and ends with a */
August 6, 2009
48
Separators
August 6, 2009
49
August 6, 2009
50
August 6, 2009
51