DSVXZ

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

• JAVA is a general purpose, object oriented

programming language developed by Sun


Microsystems of USA in 1991.
• Originally it was called OAK by James Gosling
who was one of it’s inventor.
• Java was designed for the development of
software for consumer electronic devices like
TVs, VCR’s , toasters etc.
• Therefore the language had to be
– Simple
– Portable and
– Highly reliable
History
• Java was designed by Sun Microsystems in the early 1990s.
• Basic aim of java was to solve the problem of connecting
many household machines together.
• Project was unsuccessful because no one wanted to use it.
• Earlier Name of Java : OAK
• Creator of Java : James Gosling (the father of Java)
• As there was another language called Oak , thus it was
renamed Java in 1994
• Java was publicly released on : May 27, 1995
• Java was targeted at : Internet development
• Applets Had early support from the company
: Netscape Communications
• The Green Team
• Unfortunately, the concept was much too
advanced for the them at the time. But it was just
right for the Internet, which was just starting to
take off. In 1995, the team announced that the
Netscape Navigator Internet browser would
incorporate Java technology.
• Today, Java not only permeates the Internet, but
also is the invisible force behind many of the
applications and devices that power our day-to-
day lives. From mobile phones to handheld
devices, games and navigation systems to e-
business solutions, Java is everywhere!
Features
Simple
• Syntax is based on C++ , removed many confusing and/or rarely-
used features e.g., explicit pointers, multiple inheritance through
classes, operator overloading etc. No need to remove
unreferenced objects because there is Automatic Garbage
Collection in java
Object-oriented
• Object-oriented means we organize our software as a combination
of different types of objects .
Basic concepts of OOPs are:
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
Platform Independent
• You can write a piece of code on a Windows
machine and run it (without making any code
changes) on a Mac, Linux, or any other Java-
supported platform.
• You write the code once and can run it anywhere.
That means that if u write a program in JAVA,
then u may run it on any computer. Then how
does JAVA do this? To understand this, you need
to understand how a compiler/interpreter
converts a code to an executable file.
Secured
• No explicit pointer- An explicit pointer is a variable which contains
number referring to an address in memory. An implicit one allows you to
use that address in memory, but doesn't allow you to refer to it by a
number. So really, in java EVERYTHING is a pointer to some location in
memory, but you simply can not interact with the pointers themselves.
• Programs run inside virtual machine sandbox.

• Classloader- adds security by separating the package for the classes of the
local file system from those that are imported from network sources.

• Bytecode Verifier- checks the code fragments for illegal code that can
violate access right to objects.

• Security Manager- determines what resources a class can access such as


reading and writing to the local disk.
• These security are provided by java language. Some security can also be
provided by application developer through SSL,JAAS,cryptography etc.
Architecture-neutral & Portable
• Architecture-neutral means that the byte code is
independent of the underlying platform (Hardware)
that the program is running on. For example, it doesn't
matter if your operating system is 32-bit or 64-bit, the
Java byte code is exactly the same. You don't have to
recompile your Java source code for 32-bit or 64-bit.
(So, "architecture" refers to the CPU architecture).
• "Portable" means that a program written to run on one
operating system works on another operating system
without changing anything. With Java, you don't even
have to recompile the source code; a *.class file
compiled on Windows, for example, works on Linux,
Mac OS X or any other OS for which you have a Java
virtual machine available.
High-performance
• Java is faster than traditional interpretation since byte code
is "close" to native code still somewhat slower than a
compiled language (e.g., C++)
Distributed
• We can create distributed applications in java. RMI and EJB
are used for creating distributed applications. We may
access files by calling the methods from any machine on
the internet.
Multi-threaded
• A thread is like a separate program, executing concurrently.
We can write Java programs that deal with many tasks at
once by defining multiple threads. The main advantage of
multi-threading is that it shares the same memory. Threads
are important for multi-media, Web applications etc.
Robust
• Simply means strong.
• Code is checked both at run time and compile
time.
• Java uses strong memory management.
• There are lack of pointers that avoids security
problem.
• There is automatic garbage collection in java.
• There is exception handling and type checking
mechanism in java.
Interpreted:
• To actually run a Java program, you use the
Java interpreter to execute the compiled byte-
codes.
• Java byte code is translated on the fly to
native machine instructions and is not stored
anywhere.
Dynamic
Java was designed to adapt to an evolving
environment:
• It can resolve access to objects at run time.
• Class libraries, methods and objects can be
dynamically linked.
• Even after binaries have been released, they
can adapt to a changing environment.
• Java loads in classes as they are needed, even
from across the network.
Java and object orientation
• Java is almost pure object oriented.
• SmallTalk is pure.
• Java has primitive types.
JIT Compiler and Java Interpreter
• In normal circumstances java compiler(javac) compiles java
code to bytecodes and java interpreter(java) interpretes these
bytecodes(line by line), convert it into machine language and
execute.
• JIT(Just in time) compiler is a bit different concept. It makes
your program run faster because the JIT compiler reads the
bytecodes in many sections as and when they are needed and
compiles them dynamically into machine language.
fast

JAVA
Interpreter

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy