Showing posts with label Java Language. Show all posts
Showing posts with label Java Language. Show all posts
Java is an object oriented
multi paradigm structured and imperative programming language developed by
oracle to cater the need of specifically designed circumstances. Based on the
Write Once and Runs Anywhere concept, java codes running in one platform need
not be configured again to run in another platform. This is the greatest
advantage of java being a platform independent language. A Java application
runs on the Java Virtual Machine (JVM) platform regardless of computer
architecture, proving the platform independent factor. For client server
applications, java is the most popular computer language so far due to its
smooth work flow and less number of complicacies.
Initially developed at Sun
Microsystems by James Gosling in 1995, Java is a combination of C & C++ to
support both the structure as well as object oriented functions. Later Oracle
took over the Sun Microsystems, so Java now is the property of Oracle. Based on
the open platform technology, Java is under the GNU General Public License
scheme termed as Free & Open Source Software (FOSS) that makes it so
powerful to customize any sorts of things. Originally developed in 1991, Java
was mainly designed for interactive television programs but, thought that was
miles away from the then cable network system. Initially termed as Oak, later
it became Green, finally Java inspired from Java Coffee Beans, a favorite for
Java developers. With the advent of Java 2, multiple configurations building
for various platforms became easier, thus came the popular boards like J2EE,
J2ME aimed differently for desktop as well as mobile interface creation.
In terms of properties of Java,
it is object oriented, robust, secure, architecture neutral, portable, dynamic,
threaded, interpreted and with high performance. Having all such rare
facilities, Java became programmer’s delight. For example, one of the greatest
strengths of Java is portability. It means a computer program written in Java
language can run in any system of any hardware and of any type of operating
system. This happens only in java as it compiles the code into Java byte code
instead of a platform specific machine code. Also, the library used in Java has
generic features like graphics, threading etc.
In terms of performance, java
programs are a bit slower and consume more memory than a C++ program, but the
execution speed of Java is far better because of the introduction of Just in
Time compiler. Later, with the significant introduction of Java Virtual
Machine, inner class, StringBuffer class, hotspot etc. has made Java a
programmers’ obvious choice. Another significant development is there are
certain platforms that offer direct hardware support for Java. In detail, there
are some micro controllers that can run java as hardware, deviating
traditionally from software even from JVM. The automatic garbage controller for
memory management is also a big plus in Java. Java runtime is responsible to
recover the memory when objects are no longer in use and this helps Java to be
faster. Garbage collection is another strong feature of Java and it happens
when a program is in idle state. It is automatically triggered when the memory
space is lesser and some amount of space is required to allocate a new object.
Hotspot is such a garbage collector in Java which uses the concurrent mark
sweep collector or CMS concept. Oracle is working to replace this age old
hotspot running in CMS by Garbage First Collector concept. Making a deviation or
modification, Java does not support the pointer function like C or C++.
Java Applets are programs those
are embedded in other applications mainly in the web pages and Java Servlet
technology gives an option to web developers to extend the functions of a web
server by a simple and consistent mechanism. Java Servlets are server side java
components for response generation from the client side more or less same like
Java Server Pages or JSP. Java Swing is a GUI or graphical user interface
library for the Java SE platform. All these features has made Java as one of
the leading programming languages that can be employed anywhere without any
hindrances.
C++
C++ is a popular programming language. It was first developed by Bjarne Stroustrup (a computer scientist) in 1979 at Bell labs. In 1983, it was named ‘C++’. It is literally refers to modification of the C language. C++ is very simple and efficient language. It is considered as middle level language. It comprises combination of both high level and low level language features. It is based on object oriented programming language (OOP) as OOP is based on our daily life activities.
On the other hand, Java is very object oriented, and offers one thing that helps with the dreaded memory management issues of C++. Java includes a "trash collector" that takes the tedious task of worrying about memory off of the programmer. Many Java critics claim that Java is a bad language to use, because of its slow speed. This may have been the case when Java was first introduced, but with latest releases Java has been proven to run almost as fast as the same application made in C++. Java also includes many packages that aid in graphics coding. In order to achieve these things in C++, you need to fool around with the internal GUI, or learn different languages such as DirectX or OpenGL to accomplish what is already included in Java.
1. Object-oriented programming
Both are based on OOP
2. Portability
You can practically compile the same both (C++ and Java) codes in almost any type of computer and operating system without making any changes. Both are the most used and ported programming language in the world.
3. Shortness
Codes written in both are very short in comparison with other languages, since the use of special characters is preferred to key words.
4. Speed
Speeds of C++ & Java are marvelous as compilation speed is very better.
C++ is a popular programming language. It was first developed by Bjarne Stroustrup (a computer scientist) in 1979 at Bell labs. In 1983, it was named ‘C++’. It is literally refers to modification of the C language. C++ is very simple and efficient language. It is considered as middle level language. It comprises combination of both high level and low level language features. It is based on object oriented programming language (OOP) as OOP is based on our daily life activities.
Java
Java is a computer programming language developed by James Gosling at Sun Microsystems and appeared in 1995. Java is high-level object-oriented programming language. Java is advanced efficient language. It can be used to create video games, interactive web-pages, really anything that is loosely coded. The origins of the name 'Java' is not clear as all texts are dissimilar about Java.
C++ vs. Java
If you are into programming and computer science, you no doubt have been exposed to C++. The industry standard is C++ because of its easy expandability and because it is a difficult language to learn when you get into memory management. Many teachers favor it in college, with the attitude of "once you have learned C++, you can learn anything else because everything else is easier." Many everyday applications people use have been programmed in C++.
On the other hand, Java is very object oriented, and offers one thing that helps with the dreaded memory management issues of C++. Java includes a "trash collector" that takes the tedious task of worrying about memory off of the programmer. Many Java critics claim that Java is a bad language to use, because of its slow speed. This may have been the case when Java was first introduced, but with latest releases Java has been proven to run almost as fast as the same application made in C++. Java also includes many packages that aid in graphics coding. In order to achieve these things in C++, you need to fool around with the internal GUI, or learn different languages such as DirectX or OpenGL to accomplish what is already included in Java.
The choice still comes down to the coder. If they prefer a language that is used more they can choose to code in C++. If they want to offload difficult tasks and focus on graphics and GUI interfaces, they can choose Java.
Similarities of Both (C++ & Java): ---
Both have certain similarities. The most remarkable are: 1. Object-oriented programming
Both are based on OOP
2. Portability
You can practically compile the same both (C++ and Java) codes in almost any type of computer and operating system without making any changes. Both are the most used and ported programming language in the world.
3. Shortness
Codes written in both are very short in comparison with other languages, since the use of special characters is preferred to key words.
4. Speed
Speeds of C++ & Java are marvelous as compilation speed is very better.
Finally both are beneficial languages plays an important role in computer programming...


