Upload
surya-prakash
View
76
Download
3
Embed Size (px)
DESCRIPTION
this ppt will give u brief introduction about core java.
Citation preview
[1]
[2]
CONTENTS: History Featurs of Java JDK & JRE, Bytecode & JVM Classes and objects Inheritance & Interfaces Multithreading Applets Advantages & Disadvantages
HISTORY OF JAVA
Developed by Sun microsystems (U.S.) in 1991. Was designed for development of software for electronic devices. A team headed by James Gosling was formed to undertake this
task. OOPs Language C++ was explored resulting in new language ‘Oak’. This team, The Green Project Team, demonstrated an application to
control home appliances using hand held touch screen device in 1992.
In 1993, with www, this team game up with the idea of developing web Applets using this language, to run on all types of connected computers.
In 1994, the team developed ‘Hot Java’ browser. Oak was renamed to JAVA in 1995, due to legal snags. By the time of 1996, java established itself as a leader of Internet
Programming and a general purpose OOPs language.
[3]
FEATURES OF JAVA Simple Truly Object Oriented Platform Independent Distributed Interpreted Secure Robust Multithreaded
[19]
JDK AND JRE
• Java Runtime Environment (JRE) includes no of development tools , classes and methods.
• Java Development Kit (JDK) is collection of tools used for developing and running programs. This includes: Appletviewer: enables us to run Applets (without
browser). Java: interpreter, reads bytecode files, runs Applets and
applications. Javac: compiler, translates source code to byte code files,
that is readable by interpreter. Jdb: java debugger
[4]
BYTE CODE & JVM
A program exists in two forms: source code & object code.
The program written in editor is source code. Executable form of this code is called as object code. Java compiler generates an object file containing
bytecode. This bytecode is executable on any specific CPU. Java Virtual Machine (jvm) is a virtual machine, that
can execute this bytecode using interpreter.
[5]
JavaProgram
JavaCompiler
JavaVirtual
Machine
PROCESS OF COMPILING
BytecodeJava
Interpreter
MachineCode
CONVERSION OF BYTECODE INTO MACHINE CODE
[6]
Java Runtime Environment (JRE)
Java API Class JVM
Operating System(Windows, Linux etc)
Hardware
[7]
CLASSES & OBJECTS
An object is a bundle of related state and behavior.
Software objects are used to model real world objects.
A collection of objects is known as Class. Classes can be considered as a blueprint
from which objects are derived.
e.g. the statement fruit mango creates an object mango of class fruit
[8]
A SIMPLE HELLO WORLD PROGRAM
class HelloWorldApp{ public static void main (String args[])
{System.out.println(“Hello World”);}
}
[9]
INHERITANCE
Enables user to derive new classes from existing ones.
Class derived from other class is called Subclass (also as derived class, extended class or child class)
Class getting derived is known as Superclass (also a base class or a parent class)Syntax :
class subclassname extends superclassname { variables declaration;
methods declaration;}
[10]
EXCEPTION HANDLING
It is a customary way to indicate abnormal condition.
A method encountering abnomalities, thows an exception.
Exceptions are caught by handlers. Handlers these are positioned along method
invocation stack.
[12]
Throwable
Exception Error
InterruptedException Runtime
Exceptions
Thread Death
Throwable Family
[13]
MULTITHREADING
It is a specialised form of multitasking A thread is similar to a program with single
flow of control. A thread can be considered as a subprogram. Each thread runs parallel to each other. Java Interpreter handles switching of control
between threads such that they seem to run concurrently.
[14]
APPLETS
These are small programs used in Internet Computing.
Can be transferred over internet from system to system.
Can run anywhere using Applet Viewer or any Java enabled browser.
Applets are not full featured or stand alone programs.
They run inside web page using HTML tags. Used for graphics, sounds play, arithematic
operations, accept user input, animations, interactive games etc
[16]
WHAT CAN JAVA TECHNOLOGY DO?
Development Tools Application Programming Interface (APIs) Deployment Technologies User Interface Toolkits Integration Libraries
[18]
ADVANTAGES:
DISADVANTAGES
Slow Performance (10 to 20 times slower than c++)
Compiling takes time Too much error checking Interpreter takes time too
• Memory management is expensive.
• Java being a high level language, does not offers freedom to use on embedded systems.
REFERENCES: Mrs.Faiyaz Alam, Appin, Alwar Core Java Study Materials, Appin Programming With Java book by
E.Balaguruswami Java Programming book by Vikash Thada
[21]
[22]
THANK YOU ALL
[23]