Java Technology: (C) Rajkumar
Java Technology: (C) Rajkumar
Java Technology: (C) Rajkumar
Java
Technology
1
Different Programming Paradigms
(c) Rajkumar
Functional/procedural programming:
program is a list of instructions to the computer
Object-oriented programming
program is composed of a collection objects
that communicate with each other
2
Java History
(c) Rajkumar Java is a general-purpose, object-oriented
programming language developed by Sun
Microsystems of USA in 1991 and was officially
launched in 1995.
5
Benefits of Programming in Java
(c) Rajkumar
6
Benefits of Programming in Java
(c) Rajkumar
7
Benefits of Programming in Java
(c) Rajkumar
8
Benefits of Programming in Java
(c) Rajkumar
9
Characteristics of Java
(c) Rajkumar
10
Simple and small
(c) Rajkumar
11
Object Oriented
(c) Rajkumar
Abstraction
Encapsulation
Inheritance
Polymorphism
12
Distributed
(c) Rajkumar
13
Robust
(c) Rajkumar
14
Secure
(c) Rajkumar
15
(c) Rajkumar
16
Java as Portable
(c) Rajkumar
ArchitectureNeutral
No Link Phase
Higher Level Portable Features: AWT, Unicode
17
Total Platform Independence
(c) Rajkumar
JAVA COMPILER
(translator)
JAVA INTERPRETER
(one for each different system)
19
Multithreaded and Interactive
(c) Rajkumar
20
Dynamic Binding and Extensible
(c) Rajkumar
21
JDK Versions
(c) Rajkumar
22
JDK Editions
(c) Rajkumar
23
Java Keywords
(c) Rajkumar
24
(c) Rajkumar
25
Through the Java VM, the same application is
capable of running on multiple platforms.
(c) Rajkumar
26
(c) Rajkumar
27
Rules of Java Programming
(c) Rajkumar
28
Java Basic Structures
(c) Rajkumar A simple code that will print the words Hello World!
/* This is an example of basic java program.
/* This will print Hello World! as the output
*/
public class HelloWorldApp {
29
Explanation of the Codes:
(c) Rajkumar
/* This is an example of basic java program.
* This will print Hello World! as the output */
// prints Hello World!
32
(c) Rajkumar System.out.println(Hello World!);
33
(c) Rajkumar
}
}
34
Escape Sequence in Java
(c) Rajkumar Escape sequence can be utilized when using the output
statements in Java.
Notation Character represented
\n newline
\r carriage return
\f form feed
\b backspace
\s Space
\t tab
\" double quote
\' single quote
\\ backslash
35
Common Java Derived Types (Classes)
Type
(c) Rajkumar
Description Common Methods
Considered as the root of the class
hierarchy. Every class has object as super clone(), equals(),
Object class (or parent class), and therefore, all fianlize(),hashCode(),notify
objects including arrays, implement the (),toString()
methods of this class.
Class containing a boolean field used for
booleanValue(),
Boolean wrapping a value of the primitive type
getBoolean(), valueOf()
boolean in an object.
charValue(), compareTo(),
Class containing a char field used for
getType(), isDigit(),
Character wrapping a value of the primitive type char
isLetter(), toLowerCase(),
in an object.
toUpperCase()
36
(c) Rajkumar
37
(c) Rajkumar
Class containing a long field used for wrapping a longValue(), parseLong(0,
Long
value of the primitive type long in an object. toString(), valueOf()
38
(c) Rajkumar
brighter(), darker(),
This color class used encapsulates getAlpha(), getColor(),
Color
colors in the default RGB color space. getRed(), getGreen(),
getBlue()
getAttributes(), getFont(),
Font class represents fonts. It provides
getFontName(),
Font developers the ability to utilize more
getLineMatrics(0,
sophisticated typographic features.
getSize(), isBold(), isItalic()
39
(c) Rajkumar
add(), addAll(),
Vector class implements a growable array of
addElement(), elementAt(),
Vector objects. Like an array, it contains components
remove(), removeAll(),
that can be accessed using an integer index.
size(), toArray()
40