Introduction To Java Programming
In this blog we will go through a detailed introduction to Java. Java is a Programming Language. Before understanding a programming language let's understand what is a language. Language is nothing but a communicating medium for sharing thoughts, ideas and opinions with each other. For example to communicate with someone we need a language that is understandable by both the communicators. Coming to the Programming Language, Programming Language is a set of rules for instructing the computer to perform specific tasks. It is used by the Developers to communicate with computers. Developers use programming languages to develop programs, scripts, etc. they also use it to develop websites, web applications and desktop applications.
Types of Programming Languages
Low-Level Language
Low-Level Language is a machine-dependent language that uses 0s and 1s for communicating with the users. Low-Level Language is broadly divided into two types:
Machine Language
Machine Language is a low-level language that is understood by computers. It uses binary and hexadecimal digits which can only be understood by computers. Since the computer directly understands the machine language, there is no need for a translator.
Assembly Language
Assembly Language is also a low-level language designed for specific processors. It contains a set of instructions that are in symbolic form. Those instructions are in human unreadable form. To read such instructions an assembler is used which converts assembly language to machine language.
High-Level Language
High-Level Language is a language that is used for developing programs, websites, etc. When the program is developed, it is converted into machine language with the help of a complier or interpreter. As the code is done in human-readable form, it is very easy to read, write and maintain. Examples are Java, Python, C++, C#, etc. High-Level Language is divided into the following types:
Procedural Oriented Programming Language(POP)
Procedural Oriented Programming Language is a language that contains a set of rules or procedures. It divides the program into procedures. The main advantage of POP is that the code can be reused in different parts of the program and also the program flow is tracked easily. Examples are C, Basic, Pascal, etc.
Object Oriented Programming Language(OOP)
OOP language is a language based on objects. In OOP programs are divided into small objects. It follows a bottom-up approach. The main advantage of OOP is: it is faster, easy to execute, easy to debug, etc. Examples are C++, Java, Python, etc.
Middle-Level Language
Middle-Level Language is a language that lies between high-level language and low-level language. The main advantage of it is, it supports the features of high-level language as well as low-level language. Examples are C and C++.
Introduction to Java
Java Programming Language is a high-level language that is based on OOP concepts. It is one of the most popular multi-platform programming languages used to develop a variety of applications including video games, Web Interfaces, and business applications. It is a very popular and mostly used language because the developers can write code in one platform and can run the same code on different platforms(platform independent). It provides various features like code reusability, security, reliability, etc. Because of its features, Java is used almost everywhere, like in desktop applications, mobiles, datacenter, supercomputers, etc. With its built-in constructs and supporting libraries, Java is a simple yet powerful programming language that has become very popular for all types of development projects.
History of Java
Java was developed in 1995 at Sunn Microsoft and later acquired by Oracle Corporation. Java was developed by James Gosling and Patrick Naughton. Firstly Java was named Oak. But as Oak was already a registered company, they thought of renaming it. Java is the name of the island in Indonesia where the first coffee named Java was produced and as James Gosling was having a cup of coffee, he thought to rename Oak to Java as it was easy to spell and fun to say.
Difference between Java and C++
Features | C++ | JAVA |
---|---|---|
Simple | Complex
| Simple
|
Object Oriented | Object Oriented
| Object Oriented
|
Distributed | Distributed
| Distributed
|
Robust | Robust(scalable)
| More Robust(scalable) compare to C++
|
Secure | Less secure compare to Java
| More secure compare to C++
|
Architecture-neutral | Write once, compile anywhere(WOCA)
| Write once and run anywhere/everywhere (WORA/WORE)
|
Portable | Implementation is dependent
| Implementation independent
|
High-Performance | C++ is faster than JAVA | Slower as compare to C++ |
Interpreted | Not Required | Required for the conversion of bytecode to machine code |
Multi-threaded | Multi-threaded | Multi-threaded |
Dynamic | Less dynamic compare to Java | More dynamic compare to Java |
Credits
Introduction to Java - Introducing Java Programming Language