Introduction To Java Programming

Programming LanguageJava Basic ConceptsJavaC++

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++

FeaturesC++JAVA
SimpleComplex
  • Required header file.
  • Applications need to manage pointers manually.
  • It has complex syntax and features like union, structures, operator overloading and virtual base classes.
Simple
  • Header file are not required.
  • Automatic garbage collection.
  • Java is a cleaned-up version of C++ syntax
Object OrientedObject Oriented
  • Supports Multiple Inheritance
Object Oriented
  • Multiple inheritance is replaced with interfaces.
DistributedDistributed
  • Earlier C++ was not rich with libraries
Distributed
  • Java rich with a huge library
RobustRobust(scalable)
  • Scalable but depends on the stability of libraries
  • System engineering needs to check memory overwriting and data corruption.
More Robust(scalable) compare to C++
  • It(Java) provides a pointer model that eliminates memory overwriting and data corruption.
  • Java compiler filters many possible errors.
SecureLess secure compare to JavaMore secure compare to C++
Architecture-neutralWrite once, compile anywhere(WOCA)
  • Code can be compiled in different processors
Write once and run anywhere/everywhere (WORA/WORE)
  • Java Compiler generates bytecode instructions and that bytecode is translated by virtual machines to native machine code on the fly.
PortableImplementation is dependent
  • For example, sizes of the primitive data types change or depend on the compiler.
Implementation independent
  • Java is always a 32-bit integer.
High-PerformanceC++ is faster than JAVASlower as compare to C++
InterpretedNot RequiredRequired for the conversion of bytecode to machine code
Multi-threadedMulti-threadedMulti-threaded
DynamicLess dynamic compare to Java More dynamic compare to Java

Credits


Introduction to Java - Introducing Java Programming Language

Core Java Tutorial

Get in Touch

Atrowel will be pleased to receive your feedback and suggestions. Those of you who would like to contribute, please send us an email.