You are on page 1of 5

GNITS Object Oriented Programming II B.

Tech I Sem (CSE)

Object Oriented Programming

Introduction:

 Java is a general purpose programming language that is pure object-oriented class


based language.

 Java platform first released by sun microsystems in 1995 by James Gosling along
with his team.

 There is a phrase for java (i.e) “Write once, Run anywhere”. It means that compile
java code can run on all platforms that support java without the need for
recompilation.

Java Applications:

 Banking: to deal with transaction management.

 Retail: billing applications that you see in a store or restaurant are completely written
in java.

 Information Technology: java is designed to solve implementation dependencies.

 Android: android applications are either written in java or use Java API.

 Big data: Hadoop MapReduce frameworks is written using java.

 There are so many other applications using java still. Java is an ocean of
opportunities.

FACULTY: MRS.M.LALITHA, ASSISTANT PROFESSOR, DEPT. OF CSE, GNITS 1


GNITS Object Oriented Programming II B.Tech I Sem (CSE)

Java Features:

1. Simple: java is easy to learn. No complex topics like pointers, operators overloading etc.,
where you can see in c, c++ or other programming languages.

2. Portable: java is platform independent which means java applications written on one
platform and can easily ported to another platform.

3. Object Oriented: Everything is considered to be an “object” which poses some state,


behavior and operations performed using these objects.

4. Secured: All the java code is converted in bytecode after complication, which is not
readable by a human.

5. Dynamic: Java has dynamic memory allocation feature due to which memory wastage is
reduced and performance of the application is increased.

6. Distributed: By using Remote Method Invocation (RMI), a program can invoke a method
of another program across a network and get the output.

7. Robust: Java has a strong memory management system. It helps in eliminating error as it
checks the code during compile and run time. Java must execute reliably in a variety of
systems.

8. High performance: It can be achieved through the use of bytecode which can be easily
translated into native machine code.

9. Interpreted: Java is compiled to bytecode which are interpreted by a run time


environment.

FACULTY: MRS.M.LALITHA, ASSISTANT PROFESSOR, DEPT. OF CSE, GNITS 2


GNITS Object Oriented Programming II B.Tech I Sem (CSE)

10. Multi-threaded: Java was designed to meet the real world requirement of creating
interactive, networked programs. To accomplish this, Java supports multi-threaded
programming, which allows you to write programs that do many things simultaneously.

Java Components

1. JVM (Java Virtual Machine): It is a specification that provides a runtime environment in


which the bytecode can be executed. It follows 3 notations:

a. Specifications – It is a document that describes the implementation of the JVM.

b. Implementation - It is a program that meets the requirements of the JVM


specification.

c. Runtime Instance – An instance of JVM is created whenever you want a


command on the command prompt and run the code.

2. JRE (Java Runtime Environment): JRE refers to a runtime environment in which


bytecode can be executed. It implements the JVM and provides all the class libraries and
other support files that JVM uses at runtime. So JRE is a software package that contains
what is required to run a program. Basically, it’s an implementation of the JVM which
physically exists.

3. JDK (Java Development Kit): It is the tool necessary to compile, document and package
java programs. The JDK completely includes JRE which contains tools for programmers.
The development kit is provided free of charge. Along with JRE, it includes an
interpreter/loader, a complier, an archiver, a documentation generator and other tools
needed in java development.

JVM become an instance of JRE at runtime of a java program. It is widely known as


runtime interpreter. JVM largely helps in the abstraction of inner implementation from
the programmers who make use of libraries for their programmes from JDK.
FACULTY: MRS.M.LALITHA, ASSISTANT PROFESSOR, DEPT. OF CSE, GNITS 3
GNITS Object Oriented Programming II B.Tech I Sem (CSE)

4. JIT (Just-in-Time) complier: It is able to perform certain simple optimizations while


compiling a series of bytecode to native language. Some of these optimizations
performed by JIT compliers are data analysis, reduction of memory accesses by register
allocation, translation from stack operations to register operations, eliminations of
common sub-expressions etc.,.

Why Java is so popular?

 Because it is platform independence.

 Able to execute java programs on different machines as long as there is a JRE ( be it


mobile phones, PCs running Linux, Mac OS, windows and even large mainframes
computers, JRE is compatible with all of them).

 It has the unique ability to combine innovation with stability (any code that was
written way back during the beginning of java will still run on today’s faster and
better JVMs).

 Though the java programming language is simple, it is powerful enough to allow


loading and executing wide array of libraries and classes.

There are so many reasons to learn Java:

 Java’s popularity and high salary.

 Java is portable and versatile.

 Java is an object oriented programming language.

 Java is everywhere(demand).

FACULTY: MRS.M.LALITHA, ASSISTANT PROFESSOR, DEPT. OF CSE, GNITS 4


GNITS Object Oriented Programming II B.Tech I Sem (CSE)

 Java development tools.

 Java applications.

 Tons of resources and community support.

 Java EE and its rich API.

 Java new features.

 Java is easy and open source.

FACULTY: MRS.M.LALITHA, ASSISTANT PROFESSOR, DEPT. OF CSE, GNITS 5

You might also like