oopjavachapter1

Report
Chapter 1
Lecturer PEN PHIROM
Tel
: 012 602908
E-mail : [email protected]
Web site: http://penphirom.com
Focus on and Learning outcome
• This lesson focus on:
– Birth of JAVA Program
– Feature of JAVA Program
– Type of IDE for develop JAVA Program
– Syntax to write JAVA Code
• Learning outcome:
– Know how to write java code in NetBean IDE.
Content
•
•
•
•
•
•
History of Java
Java Version
Feature of Java
Java 2 software Development kit(J2SDK)
Java Virtual Machine
How to write java source code
History of Java
• Java was developed in 1991 by James Gosling at Sun
Microsystems to be used as a solution for household
appliances such as remote control, microwave
oven,… But it is not interesting to market.
• Java is C/C++ based language.
• When the World Wide Web become popular in 1995,
Java come to life again.
• Java is now consider as native language of the
internet.
• Java is a full Object Oriented Programming
Version of JAVA
1996
1997
1998
Version 1.0(First JDK)
Version 1.1(JDK)
Version 1.2(J2SE|ME)
An extensive retooling of
the AWT event model,
inner classes , JavaBeans,
JDBC,RMI, reflection
-strictfp keyword
-Swing as Core Class
-JVM was equipped with a
JIT compiler,Java Plug-in,
Java IDL(CORBA ), Collections
framework
use private and protected
together to create
another form of
protection
Version of JAVA
2000
2002
2004
Version 1.3(J2SE)
Version 1.4(J2SE)
Version 5(J2SE)
HotSpot JVM included
RMI support optional
compatibility with CORBA
JavaSound,JNDI, JPDA,
Synthetic proxy classes
exception chaining, IPv6)
support, regular expressions,
integrated XML parser and XSLT
processor (JAXP), integrated
security and cryptography
extensions, Java Web Start
Autoboxing/unboxing,
Enumerations, Varargs,
Enhanced for each loop,
Metadata
Version of JAVA
2006
Version 6(SE)
Improved Web Service
support through JAX-WS,
JDBC 4.0 support,
Upgrade of JAXB to
version 2.0, Many GUI
improvements
2011
2013
Version 7(SE)
Version 8(SE)
The ability to cast from an
Object type to a primitive
type directly, Enhanced
library-level support for new
network protocols,
Upstream updates to XML
and Unicode
Expected
Feature of Java
•
•
•
•
•
•
•
•
•
•
Simple: not support pointer, operator overloading
Object-Oriented: use object when run time
Statically type: must declare before use and object
Compiled: must compile before run source code
Architecture neutral and portable: platform independent
Multithreads: multitasking supported.
Garbage collected: auto release object from memory
Robust: preventing system crash when error
Secure: strict access area of system
Extensible: can access native method of C++
Java 2 software Development kit
• Java API for develop java program has:
– JDK7
• IDE helps to develop a java program:
– Borland JBuilder
– NetBean
– JCreater
– Visual Café
– TextPad
Java Virtual Machine
How to write java source code
syntax:
Package Name;
Import PackageName;
public class ClassName
{
public static void main(String[ ] arg)
{
Block statement
}
}
Example
File Name:Test.java
public class Test
{
public static void main(String[ ] arg)
{
System.out.println(“Hello Java”);
}
}
Install and use IDE
• Install NetBean
– Download JDK and NetBean from web site
http://www.oracle.com/technetwork/java/javase/downloa
ds/index.html
– Install JDK
– Adding JDK Path to environment variable(Optional)
– Install NetBean
• NetBean Management Tools:
–
–
–
–
Create project
Create Package
Create Class
Compile and Run Java source code

similar documents