Introduction to JAVA

Add to Favourites
Post to:

Description
Introduction to Java and why java is known as platform independent...... what is JVM and its functions.....

Comments
Presentation Transcript Presentation Transcript

PowerPoint Presentation :

CREATION : CREATION Java was created by James Gosling in 1995 at Sun Microsystems The main reason for its creation is the need for platform independence.

Programming Paradigms : Programming Paradigms All programs consists of two elements: code and data. A program can be organized around its code(Procedure Oriented….What is happening) or around its data (Object Oriented…Who is being affected).

Principles of OOPs : Principles of OOPs Encapsulation Abstraction Inheritance Polymorphism

Difference between Java & C++ : Difference between Java & C++ C++ Compatible with C source code, except for a few corner cases. Write once compile anywhere (WOCA) Allows procedural programming, object-oriented programming, and generic programming. Exposes low-level system facilities. Pointers, References, and pass by value are supported Explicit memory management, though third party frameworks exist to provide garbage collection. Supports destructors. Supports class, struct , and union and can allocate them on heap or stack Operator overloading for most operators Full multiple inheritance, including virtual inheritance. const keyword for defining immutable variables and member functions that do not change the object. Java No backward compatibility with any previous language. The syntax is however strongly influenced by C/C++. Write once run anywhere / everywhere (WORA / WORE) Strongly encourages an object oriented programming paradigm. Runs in a protected virtual machine. Primitive and reference data types always passed by value. Automatic garbage collection (can be triggered manually). Doesn't have the concept of Destructor and usage of finalize() is not recommended. Supports only class and allocates them on the heap. The meaning of operators is generally immutable Single inheritance only from classes, multiple from interfaces final provides a limited version of const,

Characteristics : Characteristics Simple Secure Portable Object-Oriented Robust Multithreaded Architecture-neutral Interpreted High performance Distributed Dynamic

JDK(Java Development Kit) Utilities : JDK(Java Development Kit) Utilities Tool Function javac The Java compiler. Converts Java source code into bytecodes. java The Java interpreter. Executes Java application bytecodes directly from class files. appletviewer A Java interpreter that executes Java applet classes hosted by HTML files. javadoc Creates HTML documentation based on Java source code and the comments it contains. rmic Creates class files that support Remote Method Invocation (RMI). native2ascii Special program used to convert between standard Latin-1 Unicode characters and other international encoding schemes. jar Java Archive (JAR) file generator. JAR files allow multiple Java classes and resources to be distributed in one compressed file.

Elements of Java Environment : Elements of Java Environment Java Language Byte Code Definition Java libraries JVM Structure of class type

Platform Independent : Platform Independent JIT

JVM(Java Virtual Machine) : JVM(Java Virtual Machine) A Java Virtual Machine is a piece of software that is implemented on non-virtual hardware and on standard operating systems. A JVM provides an environment in which Java bytecode can be executed. The use of the same bytecode for all JVMs on all platforms allows Java to be described as a "compile once, run anywhere" programming language

JRE(Java Runtime Environment) : JRE(Java Runtime Environment) Java's execution environment is termed the Java Runtime Environment, or JRE. Programs intended to run on a JVM must be compiled into a standardized portable binary format, which typically comes in the form of .class files. A program may consist of many classes in different files. For easier distribution of large programs, multiple class files may be packaged together in a .jar (Java archive) file. The JVM runtime executes .class or .jar files using a just-in-time compiler (JIT)

JIT(Just In Time Compiler) : JIT(Just In Time Compiler) The JIT compiler translates bytecodes into native machine code. This compilation process is done only once, and a link is created between the bytecode and the corresponding compiled code. The purpose of this process is to increase the speed at which Java programs run.

A java program is defined by a public class that takes the form : : A java program is defined by a public class that takes the form : public class program-name { optional variable declarations and methods public static void main(String[] args ) { statements } optional variable declarations and methods }

Example : Example class HelloWorld { public static void main (String args []) { System.out.println ("Hello World!"); //Displays the enclosed String on the Screen Console } }

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
Neelam Jhala
Computer Teacher
User
6 Followers

Your Facebook Friends on WizIQ

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect