This is a mini-lesson on Java concepts and syntax, aimed at PL/SQL developers and DBAs who need to know sufficient Java to start building ADF Components with Java.
It was held at KScope 11 in Long Beach!
1. All the Java ADF Beginners
need to know! – Part 1
Markus Eisele
Oracle ACE Director
Msg systems ag, Germany
1 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
3. Overview
1. Introduction
2. History
3. Java„s Characteristics
4. Java Editions
5. Development Environments
6. Your First Program
7. The Language Basics
3 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
4. Introduction
The term Java actual refers to more than just a
particular language like C or Pascal. Java
encompasses several parts, including :
• A high level language
The Java language is a high level one that at a
glance looks very similar to C and C++ but offers
many unique features of its own.
• Java bytecode
A compiler, such as Sun's javac, transforms the Java
language source code to bytecode that runs in the
JVM.
• Java Virtual Machine (JVM)
A program, such as Sun's java, that runs on a given
platform and takes the bytecode programs as input
and interprets them just as if it were a physical
processor executing machine code.
4 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
5. Introduction
There were five primary goals in the creation of the
Java language.
It should:
• be "simple, object oriented, and familiar".
• be "robust and secure".
• have "an architecture-neutral and portable
environment".
• execute with "high performance".
• be "interpreted, threaded, and dynamic".
5 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
6. History
Year Milestone
JDK 1.1 (released on Feb 19,1997) Major additions included an extensive retooling of
the AWT event model, inner classes added to the
language, JavaBeans and JDBC.
J2SE 1.2 (Dec 8, 1998) Reflection, a Collections framework, Java IDL (an
Codename Playground. IDL implementation for CORBA interoperability),
Swing graphical API, a Java Plug-in, JIT compiler.
Bundling of the HotSpot JVM (the HotSpot JVM was
J2SE 1.3 (May 8, 2000)
first released in April, 1999 for the J2SE 1.2 JVM),
Codename Kestrel. JavaSound, JNDI and JPDA.
J2SE 1.4 (Feb 6, 2002) Developed under the Java Community Process as
Codename Merlin. JSR 59. Regular expressions modeled after Perl,
exception chaining, an integrated XML parser and
XSLT processor (JAXP), and Java Web Start.
J2SE 5.0 or 1.5 (Sep 30, 2004) Developed as JSR 176, New language features
Codename Tiger. including the for-each loop, generics, autoboxing
and var-args.
Java SE 6 (Dec 11, 2006) Database manager, Use of scripting languages with
Codename Mustang the JVM, Visual Basic language support. Support
for pluggable annotations (JSR 269), GUI
improvements, including native UI enhancements,
improvements to the JPDA & JVM Tool Interface
Java SE 7 — Codename Dolphin. The Dolphin Project started in August 2006, with
first release estimated in September 2010.
6 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
7. Java‘s Characteristics
• Platform Independence
The Write-Once-Run-Anywhere ideal
• Object Oriented
Object oriented throughout - no coding outside of class definitions, including main().
• Compiler/Interpreter Combo
Code is compiled to bytecodes that are interpreted by a Java virtual machines (JVM) .
• Robust
Exception handling built-in, strong type checking (that is, all data must be declared an explicit type),
local variables must be initialized.
• Several dangerous features of C & C++ eliminated:
No memory pointers , No preprocessor , Array index limit checking
• Automatic Memory Management
Automatic garbage collection - memory management handled by JVM.
• Security
No memory pointers, Programs runs inside the virtual machine sandbox, Array index limit checking
• Dynamic Binding
´The linking of data and methods to where they are located, is done at run-time. New classes can be
loaded while a program is running. Linking is done on the fly. Even if libraries are recompiled, there is
no need to recompile code that uses classes in those libraries.
• Good Performance
Interpretation of bytecodes slowed performance in early versions, but advanced virtual machines with
adaptive and just-in-time compilation and other techniques now typically provide performance up to
50% to 100% the speed of C++ programs.
• Threading
Lightweight processes, called threads, can easily be spun off to perform multiprocessing. Can take
advantage of multiprocessors where available Great for multimedia displays.
• Built-in Networking
Java was designed with networking in mind and comes with many classes to develop sophisticated
Internet communications.
7 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
8. Java Editions
Optional
Packages
Optional
Packages
Optional Optional
Java Packages Packages
Platform
Java
Enterprise MIDP Personal Profile
Platform
Edition
Standard CLDC CDC
(Java EE)
Edition
(Java SE) Java Platform
Micro Edition
(Java ME)
8 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
9. Java Editions
Source: http://en.wikipedia.org/wiki/Java_(software_platform)
9 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
11. Your First Program
11 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
12. The Language Basics
12 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
13. Lesson in a tweet
“The best thing about a boolean is
even if you are wrong,
you are only off by a bit.”
(Anonymous)
http://www.devtopics.com/101-great-computer-programming-quotes/
13 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
14. Thanks!
http://www.sagecomputing.com.au/
14 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
15. Free eBooks
http://java.sun.com/docs/books/jls/
http://www.mindviewinc.com/Books/downloads.html
http://download.oracle.com/javase/tutorial/
http://math.hws.edu/javanotes/
15 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11
16. Thank you for your attention
Markus Eisele
Principle IT Architect
http://blog.eisele.net
http://twitter.com/myfear
www.msg-systems.com
www.msg-systems.com
16 Markus Eisele, Oracle ACE Director FMW & SOA msg systems ag, 26/06/11