Introduction to Java
Introduction to Java. As you can understand with the title “Introduction to Java”, the article is about Java Programming Language. This article will be very short and the information will be very relevant so that you can take away the most relevant points about Java in a very short span of time. Java is an object-oriented programming language. Besides data types, we treat everything as an object in this language. Java was developed by James Arthur Gosling in 1991.
A little introduction to James Arthur Gosling.
He was a Canadian computer scientist. James Arthur Gosling took his Bachelor of Science Degree from the University of Calgary. He took his M.A. and Ph.D. from Carnegie Mellon University. James worked with Sun Microsystems between 1984 and 2010. He developed many Compilers and Mail Systems for Sun MicroSystems. He also developed a multi-processor version of Unix for 16-way computer systems. James Arthur Gosling is known as the father of Java.
Let’s come back to Java. Below are some bullet points about Java.
- Java was developed in 1991 but its first version Java 1.0 was released in 1995.
- Object-Oriented Programming Languages java was initially known as OAK and later the name was changed to Java.
- Java was developed by Sun Microsystems but later acquired by Oracle.
Features of Java
1 – Object Oriented.
2 – Compiled and Interpreted.
3 – Platform Independent and Portable.
4 – Distributed.
5 – Multi-Threaded.
6 – Dynamic.
7 – Robust and Secure.
Java is an Object-oriented programming language and everything in Java is considered as a Class or an Object. For instance, if we are developing any Function in java then we create a class and define the Function inside the class. Whenever we want to access the Class or Function, we create an object of this class and access the function.
Compiled and Interpreted
Java uses both Compilers and Interpreter. Whenever you write some code in Java. Java Compiler compiles the code and converts it into Bytecode. Then the JVM interpreter interprets the Bytecode and converts it into Real Machine language. Bytecode is also called intermediate code. Here interpreter is according to the Machine. The benefit of this process is the freedom of choosing your Machine. Once the code is written it can run on any machine where JVM is installed.
Platform Independent and Portable
Now that we know Java uses both Compilers and Interpreter. JVM is available for all types of Machines. Mac, Linux, and Windows you name it, JVM is available for all these platforms. Whenever we write some java code on one machine, we can run that code on any machine of our choice. JVM(Interpreter) will interpret into bytecode. It means Java provides freedom of choosing your machine and portability of taking your code on any machine.
Java has Java.Net package. Java.Net package can be used to create programs that can run on network easily. Java.Net package is designed to communicate with URLs and all different Internet Protocols.
A thread is an instruction to perform a particular task. A class is available in Java.lang package called Thread. This class provides us with the facility to create multiple threads to perform multiple tasks at the same time. Generally, threads run in a sequence. Because Java is a multi-threaded programming language, these threads will be working together at the same time. It saves time and makes the execution of the program quick.
Java has this feature of adding a new class or new method dynamically from other programming languages. Whenever Java runs a program, it loads the required classes and libraries. Java also has libraries for C, C++ and several other programming languages. These types of methods are called Native Methods. These Native methods can be loaded at runtime dynamically.
Robust and Secure
Checking of code before it is executed. As we have seen so far Java is an object-oriented programming language and it can dynamically add methods from other programming languages as well. Java also has exception handling which can handle any type of exception. We can say Java is a Robust and secure programming language because whenever we create an applet to run on the Internet, security becomes the most important factor. Java checks the code before it is executed. If there is any possibility of malicious code and it is not safe to execute it. Java will not execute the code. It may be a virus.
Java has so many other features but we have discussed here the most important features of Java.
Hope the article was helpful.
Have a nice day!