In the past it has been very difficult for a
software developer to make, job as programmer easy and efficient. As there was
growth of multiple incompatible hardware architecture, each supporting multiple
incompatible operating systems with each platform having a different graphical
To cope up with this kind of situation a better
solution came up which was called JAVA.
What were the paramount challenges that JAVA had to
Some paramount challenges that JAVA need to meet up
where, Security of the applications, and that these applications should consume
minimum amount of resources,
Secondly, the applications should be able to run on
any hardware or software platform, and can be extended dynamically.
To overcome these challenges some goals were
designed for the applications-
DESIGN GOALS OF JAVA
that should be able to run on multiple platforms in distributed networks.
java being simple, we mean that that it is a language which does not require
any kind of professional learning to use it.
It is said that java is
object oriented language, what it means that through this language we can
combine data structures with functions to create re-usable objects.
Java is familiar, as in
the programmers who used to work on C++ language can easily migrate to java and
be productive quickly.
3. Robust and Secure
Java is a robust
language as it provides a very quick compile-time checking. It interprets the
code line-by-line while we are writing the code. It also has the concept of no
pointers or pointer arithmetic.
Java is designed in
such a way that the applications that we develop in this, are very secure at
large or extensive level.
4. Architecture Neutral and Portable
Java is made to be
architectural neutral because it was constructed to support the applications
that will be deployed into heterogenous networked environments. So, in such
environments it is necessary that the applications is able to run on any kind
of hardware architecture, apart from this it should also be execute on all
sorts of operating systems.
this to happen java generates bytecodes- which is an
neutral intermediate formatted constructed to transfer
code efficiently to multiple hardware and
If java is architecture
neutral, that it automatically becomes a
The environment created by
these characteristics is called as Java
5. High Performance
Java is having high
performance capability because there is an automatic garbage collector, which
disposes off the waste memory, by allocating to that part which is in need of
it, leading to better performance.
Threaded, and Dynamic
Java is an interpreted
language which means that we don’t need to
run the long cycles of- compile, link and
test the code. This leads to
the faster development cycles
that is- prototyping, experimentation,
and rapid development.
Java is threaded which means
it provide multi-threading capabilities
to the programmer to create
applications with many concurrent
threads of activity, which
results paramount interactivity with the
From java being dynamic we mean that when
java compiles the
code, at that run-time is
dynamic, meaning the linking process or
stages are dynamic. We can
add new modules on demand from
variety of sources. Interactive
code can be loaded from anywhere.
Java provides various kinds of libraries which
contains methods and classes that a developer can use to create multi-platform
of these libraries are –
Till now we talked about how java is
beneficial for programming and what are were its characteristics. Now we will
learn how Java is different from C and C++ and what are its essential features.
in Java is object apart from the primitive data types.
Primitive data types
numeric data type-
bit byte, 16-bit short, 32- bit int, 64- bit long
No unsigned type specifier for integer
data types in java.
Real numeric types are 32-bit float, 64
char data type in java defines 16-bit Unicode
Unicode character are unsigned 16-bit
Range 0 through 65,535.
This data type is new for the
programmers as it has been added to java as primitive data type
Keywords used are –TRUE and FALSE or YES
Can’t be converted to any numeric type.
new operator is added which defines
use + operator for concatenation two or more strings.
in java are objects which is having a run-time representation.
Declaring an array in java——-
abcd; (abc here is class, and
abcd is array)
storage to array——
allocating the values is done in the similar way , as it is done in C language.
here in java are objects not pseudo arrays as in C language.
are two types of String objects, first are those which are read only objects,
namely String class, and second for those objects which we wish to modify,
which are enclosed in double quotes are strings.
java uses + (concatenation operator) in an extensive way
break or continue multiple-nested loop or switch cases java is not having goto statement
but, it has break and continue statement instead.
here function of continue is different as it used to be in C language. Here the
continue statement passes control to the outer for statement, or we can say the
next iteration of the loop.
Memory Management and Garbage Collection
C and C++ it was very difficult to manage the memory as, the programmer as to
free up the memory all by itself.
Java is having a very good memory management model which is based on objects
and references to objects.
there are pointers used in java, so the only reference is done to the object.
an object has no more in use, then a new operator “Automatic Garbage collector”
which is an integral part of java, free up the memory.
garbage collector increase its performance by keeping in check the behaviour of
the user while interacting with the softwares. It sees that for what time it is
taking pauses while proceeding further, seeing this behaviour it gathers and
compacts unused memory, and increases the portability of resources available.
Integrated Thread Synchronization
is supported by java may it be language level or may via the support from its
run-time environment system and thread objects. It provides ease to the
programmer for constructing thread-safe multithreaded classes.
let us study the features that are not present in Java, but where there in
defines or preprocessors
structure or unions present as complex data type
as there where structures
NO, as there where structures
as here use of interfaces serve the purpose of multiple inheritance.
as java uses objects and arrays of objects.