by Dinesh Thakur Category: Introduction to Java

Java is the object-oriented programming language, similar to C++ high-level programming language and architecture neutral developed by Sun Microsystems in 1995 and later acquired by Oracle Corporation. Java was originally called OAK. Java is a computing platform for application development. Object-Oriented meaning the capability to reuse code. Secondly, it is platform independent, i.e., we don't have to develop separate applications for different platforms. It is possible to develop a single application which can run on multiple platforms like Windows, UNIX, and Macintosh systems. Java designed for hand-held devices and set-top boxes.

Source code (files with a .java extension) of the Java program is converted to Bytecode  (files with a .class extension) by the java Compiler which in turn is converted to machine code by java Interpreter.Java interpreters and runtime environments, known as Java Virtual Machines (VMs). Bytecode can also be converted directly into machine language instructions by a just-in-time compiler (JIT).

Java does not support the use of pointers. It automatically manages memory garbage-collection routine activated when the system runs short of memory. Java provides the most secure programming environment. Java doesn't just fix security loopholes-it eliminates them, which makes Java the perfect language for programming on the Web.

System crackers use programs to forge pointers to memory, steal information from your system, and crash the system permanently. In Java, we can't forge pointers to memory because there are no pointers.

Java is highly secure because the Java runtime environment provides strict rules for programs started from remote hosts. These programs cannot access the local network, cannot access files on the local system, and cannot start programs on the systems.

What is Java Platform?

Java platform is a computing platform from Oracle that helps to run and develop Java applications. The Java platform consists of an execution engine, a compiler, and a set of libraries. It is platform independent, i.e., we don't have to develop separate applications for different platforms.

Java can be used to create two types of programs. Those are Applications and Applets. An application is a program that runs on the user’s computers under the operating system. An Applet is a small window based prg.that runs on HTML page using a java enabled web browser like internet Explorer, Netscape Navigator or an Applet Viewer.

Java Features

Here we list the basic features that make Java a powerful and popular programming language 

1) Compiled and Interpreter: has both Compiled and Interpreter Feature Program of java is First Compiled and Then it is must to Interpret it .First of all The Program of java is Compiled then after Compilation it creates Bytes Codes rather than Machine Language. Then After Bytes Codes are Converted into the Machine Language is Converted into the Machine Language with the help of the Interpreter. So For Executing the java Program First of all it is necessary to Compile it then it must be Interpreter

2) Platform Independent: Java Language is Platform Independent means program of java is Easily transferable because after Compilation of java program bytes code will be created then we have to just transfer the Code of Byte Code to another Computer This is not necessary for computers having same Operating System in which the code of the java is Created and Executed After Compilation of the Java Program We easily Convert the Program of the java top the another Computer for Executio

3) Object-Oriented: We Know that is purely OOP Language that is all the Code of the java Language is Written into the classes and Objects So For This feature java is Most Popular Language because it also Supports Code Reusability, Maintainability etc.

4) Robust and Secure: The Code of java is Robust andMeans ot first checks the reliability of the code before Execution When We trying to Convert the Higher data type into the Lower Then it Checks the Demotion of the Code the It Will Warns a User to Not to do this So it is called as Robust.

Secure : When We convert the Code from One Machine to Another the First Check the Code either it is Effected by the Virus or not or it Checks the Safety of the Code if code contains the Virus then it will never Executed that code on to the Machine.

5) Distributed: Java is Distributed Language Means because the program of java is compiled onto one machine can be easily transferred to machine and Executes them on another machine because facility of Bytes Codes So java is Specially designed For Internet Users which uses the Remote Computers For Executing their Programs on local machine after transferring the Programs from Remote Computers or either from the internet.

6) Simple Small and Familiar: is a simple Language Because it contains many features of other Languages like c and C++ and Java Removes Complexity because it doesn’t use pointers, Storage Classes and Go to Statements and java Doesn’t support Multiple Inheritance.

7) Multithreaded and Interactive:  Java uses Multithreaded Techniques For Execution Means Like in other in Structure Languages Code is Divided into the Small Parts Like These Code of java is divided into the Smaller parts those are Executed by java in Sequence and Timing Manner this is Called as Multithreaded In this Program of java is divided into the Small parts those are Executed by Compiler of java itself Java is Called as Interactive because Code of java Supports Also CUI and Also GUI Programs.

8) Dynamic and Extensible Code: Java has Dynamic and Extensible Code Means With the Help of OOPS java Provides Inheritance and With the Help of Inheritance we Reuse the Code that is Pre-defined and Also uses all the built in Functions of java and Classes.

9) Distributed: Java is a distributed language which means that the program can be design to run on computer networks. Java provides an extensive library of classes for communicating ,using TCP/IP protocols such as HTTP and FTP. This makes creating network connections much easier than in C/C++. You can read and write objects on the remote sites via URL with the same ease that programmers are used to when read and write data from and to a file. This helps the programmers at remote locations to work together on the same project.

10) Secure: Java was designed with security in mind. As Java is intended to be used in networked/distributor environments so it implements several security mechanisms to protect you against malicious code that might try to invade your file system.

For example: The absence of pointers in Java makes it impossible for applications to gain access to memory locations without proper authorization as memory allocation and referencing model is completely opaque to the programmer and controlled entirely by the underlying run-time platform .

11) Architectural Neutral: One of the key feature of Java that makes it different from other programming languages is architectural neutral (or platform independent). This means that the programs written on one platform can run on any other platform without having to rewrite or recompile them.

In other words, it follows 'Write-once-run-anywhere' approach. Java programs are compiled into byte-code format which does not depend on any machine architecture but can be easily translated into a specific machine by a Java Virtual Machine (JVM) for that machine. This is a significant advantage when developing applets or applications that are downloaded from the Internet and are needed to run on different systems.

12) Portable: The portability actually comes from architecture-neutrality. In C/C++, source code may run slightly differently on different hardware platforms because of how these platforms implement arithmetic operations. In Java, it has been simplified.

Unlike C/C++, in Java the size of the primitive data types are machine independent. For example, an int in Java is always a 32-bit integer, and float is always a 32-bit IEEE 754 floating point number. These consistencies make Java programs portable among different platforms such as Windows, Unix and Mac .

13) Interpreted: Unlike most of the programming languages which are either complied or interpreted, Java is both complied and interpreted The Java compiler translates a java source file to bytecodes and the Java interpreter executes the translated byte codes directly on the system that implements the Java Virtual Machine. These two steps of compilation and interpretation allow extensive code checking and improved security .

14) High performance: Java programs are complied to portable intermediate form know as bytecodes, rather than to native machine level instructions and JVM executes Java bytecode on. Any machine on which it is installed. This architecture means that Java programs are faster than program or scripts written in purely interpreted languages but slower than C and C++ programs that compiled to native machine languages.

Although in the early releases of Java, the interpretation of by bytecode resulted in slow performance but the advance version of JVM uses the adaptive and Just in time (JIT) compilation technique that improves performance by converting Java bytecodes to native machine instructions on the fly.

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.