Free Data Structures and Algorithms Course









Subscribe below and get all best seller courses for free !!!










OR



Subscribe to all free courses

Introduction to Java Environment and Java platform

Java is not just an ordinary programming language. It is a complete technology which depends on no other resources. If we look more closer on its package, this technology contains:

1. A widely used programming language.
2. A complete development environment.
3. A complete application environment.
4. A complete deployment environment.
5. Full support of Integrated Libraries.

Let us look into these features step-by-step :

1. The Java programming language

Java is an Object Oriented Programming Language, which needs two important aspects for its efficient working, such as compiler and interpreter. The compiler translates program into an intermediate code called as java bytecodes. For JVM bytecodes are platform independent. These bytecodes are interpreted by the interpreter. All the execution of statements and parsing of Java bytecode is been done by the interpreter. The only difference is compilation of the program is done once and interpretation is done each time the program executes.

2. The application environment

Java comes with a huge collection of API (Application Programming Interface). These API provides Java various useful classes which can be used in applications, without writing any of the code.

3. The development environment

Java comes with a full fledged development environment in which a developer can compile, run, monitor, debug and document an application.

4. The deployment environment

Java technology comes with standard deployment environment such as Java Web Start and various Java plug-in for deploying the applications.

5. Integration Libraries

Java technology works with various integration libraries such as JDBC (Java Database Connectivity), JNDI (Java Naming and Directory Interface), RMI (Remote Method Invocation) and JMS (Java Messaging service) for communicating between various remote and database objects.

The Java Platform

The term platform refers to a software or hardware environment where a programs runs. Java platform is a software which runs over operating system hardware. The Java platform has two components such as JVM (Java Virtual Machine) and Java API.

The Java Virtual machine is installed over various hardware based platforms and this makes Java platform independent programming language. The code is written once and run by JVM installed over different operating systems. Java compiler compiles the code into bytecode and this bytecode can be interpreted by the JVM, so the code can execute on various platforms.

The Java Application programming Interface is a large collections of Java classes which are ready made and provides many capabilities such as GUI, Event Handling, I/O, file handling and networking etc. All the interrelated classes and interfaces are grouped together which are known as packages.

Java now comes in three editions :
1. J2SE (Java Standard Edition).
2. J2EE (Java Enterprise Edition).
3. J2ME (Java Micro Edition).

Java Standard Edition is used to develop client-side stand-alone applications and applets. Java Enterprise Edition is used to develop server-side applications , servlets and distributed applications. Java Micro Edition is used for developing mobile and wireless applications.

Java Standard Edition comes with JDK (Java Development Kit) which has SDK (Software development Kit) which is a set of command-line tools for creating applets and applications. JDK also has JRE (Java Runtime Environment) and set of libraries. These things combines and provides us the Java Platform. Now-a-days various IDE (Integrated Development Environment) are available such as Eclipse, Netbeans etc which helps us in editing, compiling, building and debugging Java application.


Java Vs C++ difference and comparisons

Comparison and Difference between Java and C++

Before advent of Java, C++ was very popular and most widely used object oriented programming language. Bjarne Stroustrup developed C++ in the year 1979. Java when comes to syntax, it is quite similar to C++. Java and C++ has many major differences. Java left out C++ complex concepts, modified and added new. 


Let us examine few of major differences between the two :-
1.  Java is pure object oriented programming language, while C++ supports both procedural and object oriented approach.
2.  Java does not support multiple inheritance, while C++ supports multiple inheritance.
3.  Java does not support operator overloading, while C++ supports operator overloading.
4.  In Java, methods are part of the class, while C++ has stand alone methods which are not part of class.
5.  In Java, objects are passed to methods only by reference, while in C++, objects can be passed to functions by value or reference.
6.  Java doesn’t support pointer mechanism, while C++ uses pointers extensively.
7.  In Java, Strings are objects, while in C++, Strings are null-terminated character arrays.
8.  Java has built in string concatenation operator, while in C++ all string operations are performed using functions.
9.  Java doesn’t support Templates, while C++ supports Templates for parameterized type.
10.    Java doesn’t support default arguments, while in C++ functions can take default arguments.
11.    In Java, methods are dynamically bound, while in C++ only virtual functions are dynamically bound.
12.    In Java, array lengths in multidimension can vary from one element to the next within one dimension, while in C++ multidimensional arrays lengths are of same sizes.
13.    In Java, there is bound checking on the arrays, while in C++ there is no bound checking.
14.    Java supports automatic garbage collection, while in C++ there is no automatic garbage collection.
15.    Java is a compiled and interpreted language, while C++ is a compiled language.
16.    Java has no functionality of structures and unions, while C++ has structures and union.
17.    Java doesn’t supports forward referencing, while C++ supports explicit forward referencing.
18.    No typedef in Java, while C++ supports typedef.
19.    Java provides documentation comments which is missing in C++.
20.    In Java, main method doesn’t return any value, while in C++ it can return values.
21.    Java supports labels on break and continue statements, while in C++ there is no label functionality.
22.    Java is architectural neutral programming language, while C++ is specific to particular architecture.
23.    Java supports interfaces which is missing in C++.
24.    Java supports multithreading which is missing in C++.
25.    No preprocessor is required in Java, while C++ rely on preprocessor.
26.    In Java, program name is not included for command-line arguments, while C++ includes the program name.
27.    Java supports web based applications such as JSP, servlets and applets, while C++ lacks such feature.
28.    Java supports distributed applications such as RMI and sockets, while C++ lacks this functionality.
29.    Java also supports network protocols such as TCP/IP and HTTP, while C++ lacks those supports.

A Brief History Of Java Programming Language

Introduction
It is been seen that current programming problems are complex. Structured programming cannot manage complexity of complex programs. Obeject Oriented Programming makes it possible to organise large and complex programs using classes, objects, inheritance, polymorphism and encapsulation. C++ for years was most widely used OOP language. Due to advent of internet, Java became widely used and gained tremendous popularity.

Java came as the programming language which was widely used in the consumer electronic devices such as microwaves, television etc. A lot of research was been done to build a small, reliable, processor independent, real-time, safe and distributed software for these systems. With the coming of Internet and WWW, Java went on becoming a full fledged programming language, shifting its focus from consumer devices to a vast platform to create powerful, distributed, robust and secure applications.


A Brief History Of Java Java Programming Language was conceived by the effort of 5 great people, James Gosling, Patrick Naughton, Chris Warth, Mike Sheridan and Ed Frank. They all worked for Sun Microsystems, Inc and came up with Java in 1991. The language took 18 months to develop and had a initial name as "Oak" which was renamed to Java in 1995, due to copyright issues. The idea was to develop a language which was platform-independent and which could create embedded softwares for consumer electronic devices. C and C++ were quite inefficient for the purpose because they were not platform-independent as there programs have to be compiled for particular hardware before execution. Also, the compiled code was inefficient for other processors and it had to be recompiled. So the team of 5 also called as Green Team began to work in developing a easier and cost-efficient solution. They worked for 18 months in developing a portable, platform-independent language that could create a code which can run on variety of processors under differing environments. The above necessity led to creation of Java. At the same time, Internet and WWW were becoming popular day-by-day. The web programs lacked the features of platform-independence. It required programs that could run on any operating system irrespective of hardware and software configuration. It required small and portable programs that could be securely transported over the network. The programming language available to suit such requirements was Java. Many developers soon realized that architectural neutral language like Java would be best for writing programs for internet. Thus forcus of Java was shifted from consumer electronics to World Wide Web. Today, Java is not an ordinary programming language. It is a technology which is simple, Object Oriented, Distributed, Robust, Secure, Architecture neutral, Portable, Interpreated, Multithreaded, High Performance and Dynamic.  
 
© 2021 Learn Java by Examples Template by Hubberspot