Example Programs
Demonstration of control structures(for,while...)
Demonstration of creating methods and calling methods
Demonstration of creating a utility class
**************************************************************
Where is Java Used?
Server Side Services
.Server. applications- Web Servers, SQL Servers...
Servlets // HTTP Server Side .Scripting. services
Remote Method Services, RMI, Hessian
Client Side Services
Applets
Java Web start
Standalone Applications
Development Environments
Document Editors
Games
Why has it been adopted?
Well documented.
Freely available.
.Easy. to program complex applications
What has changed over the past 10 years?
Early on Java was .slow. due to interpretation
(The difference between interpreted and non-interpreted)
Modern java Virtual Machines use JIT(Just In Time) compiling
Current VMs and Java Extensions support OpenGL 3D graphics!
Why are we in this class?
Answer:
Object Oriented Design
An object is a memory structure that contains properties and functions
(.instance variables. and .methods.)
Objects can be built to represent real world objects or abstract ideas.
Class Vs. Object
A class is a blueprint to construct an object
Multiple copies of an object can exist. (Usually in Memory only)
Only one class definition will exist. (Usually on Disk only)
Primitive Data Types (See appendix D)
int (32 bits)
short (16 bits)
long (64 bits)
boolean (platform specific)
float (32 bits)
double (64 bits)
byte (8 bits)
char (16 bits)
Non-Primative Data Types(Objects)
Integer
Long
Short
Float
Double
Byte
BigInteger
BigDecimal
String
Boolean Operators
==, <=, =>, <, >, ^, &&, ||, &, |
Assignment Operators
=, +=, -=, *=, /=, %=, ++, --