Download Future prospects

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Asynchronous event handling
Asynchronous transfer of control (interrupts)
Asynchronous thread termination
Multi-tasking (OS tasks) and multithreading (short term tasks e.g. printing)
Just in time compilation – compiles
loops etc. just before runtime
class Play extends Event {
void run()
{code}
}
Contactless ePassports and credit
card/smart cards use the Java Card
platform
GM chose Java Enterprise System
(J2EE) as the integrated software
environment for its global IT
infrastructure
Real Time
System (RTS)
JDK – Java Development Kit
GregorianCalender d; d.set
calendar object
“run()” method will override
“run()” in superclass
method of “d”
Char – 16 bit
Unicode character
subclass inherits state and
behaviour from ALL its
ancestors
Boolean
Arrays
Can allocate
arrays of any type
Strings
Swing extends AWT’s
painting model
Application triggered
super.paint(g);
Color set to
foreground
Can’t be converted to
numeric type
Arrays of arrays
make multidimensional arrays
myPoints = new Point [10];
“StringBuffer” class
(editable/mutable
object)
Graphics object “g”
Translation (0,0)
= top left
Real
Point myPoints [];
public void repaint();
Paints lightweight
descendents
float – 32 bit
double – 64 bit
byte – 8 bit
short – 16 bit
int – 32 bit
long – 64 bit
Numerical
“has a” – class is included and
can contain other classes (but
no inheritance)
Repaints the whole
screen
Swing – lightweight
Java components
Integer
super keyword refers
to any method in
base class
“is a” – all methods of
superclass inherited
AWT (Abstract Window Toolkit) –
OS dependent components
Application Programming Interface (API)
Object oriented language
Garbage collection – prevents memory
leaks and saves programmer from
managing memory BUT uncontrolled, can
make deterministic response time
impossible
“JApplet” (jPanel etc.)
“Applet”
Write once, run anywhere –
because of JVM (virtual machine)
Encapsulation
Polymorphism
Single level inheritance
Better multi-platform
performance
Uses native (Windows
OS) components
NO pointers!
NO “goto”
statement
Allocates 10 references to
“Point”s initialized to null
“String” class
(immutable/read only)
Mouse click
NO preprocessor
Updated display
value
System triggered
Component first made
visible on screen
Component resized or
damaged
Use “continue” and
“break” statements
on labelled loops
“length()”
accessor method
NO subroutines/functions, just methods
NO operator overloading (instead,
declare a class, instance variables
and methods)
NO automatic coercions (instead use
explicit cast: “myInt = (int)myFloat”)
Garbage collector
Concatenation (e.g. “Result = ” + number + “%”)
If there are no more
references, object goes to
garbage collection
Gathers and compacts
unused memory
Makes use of Java’s
multithreading capabilities
(syntactic and run-time)
Runs in a low priority thread
in idle periods
“.length” instance
variable stores
length of array
Exception generated if indexes
outside bounds of array
NO structures/unions, just classes
All references to objects are
through “handles”
Uninitialized array
of “Point”s (only
reference handle
initially)