DEV Community

irakozeyves1
irakozeyves1

Posted on

The theory behind Java Programming Language Part 1.

Introduction to awesome Programming Language Java.

Java is a simple and yet powerful object-oriented programming language and it is in many similar to c++ programming.

Java is created by James Gosling from Sun Microsystem in 1991. The first publicly available version of java (java 1.0) was released in 1995.

Java is defined by a specification and consists of programming language, a compiler, core libraries, and a runtime machine(Java virtual machine).
The java runtime allows software developers to write program code in other languages than the Java programming language which runs on the Java virtual machine.
The Java platform is usually associated with the Java virtual machine and the Java core libraries.

Java virtual machine

The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine.

Java Runtime Environment vs Java Development Kit

A Java distribution typically comes in two flavors, the Java Runtime Environment(JRE)and the Java Development Kit(JDK). The Java Runtime Environment consists of the Java Virtual Machine and the Java class libraries. Those contain the necessary functionality to start Java programs.
The Java Development Kit additionally contains the development tools necessary to create Java programs. The Java Development Kit, therefore, consists of a Java compiler, Java Virtual Machine, and the Java class libraries.

Uses of JAVA

Java is also used as the programming language for many different software programs, games, and add-ons.
Some examples of more widely used programs written in Java or that use Java include the Android apps, Big Data Technologies, Adobe Creative Suite, Eclipse, Lotus Notes, Minecraft, OpenOffice, Runescape, and Vuze.

Java Characteristics

The Java characteristics are classified into eleven pillars such as Simple, Object-Oriented, Platform independent, Secured, Robust, Architecture neutral, Portable, High Performance, Multithread, Distributed, Interpreted.

Simple

Java is easy to learn and its syntax is quite simple and easy to understand.

Object-oriented

in java, everything is an object which has some data and behavior. Java can be easily extended as it is based on Object Model.

Platform independent

Unlike other programming languages such as C, C++, etc which are compiled into platform-specific machines. Java is guaranteed to be written once, run-anywhere language.
On compilation, Java program is compiled into bytecode. This bytecode is platform-independent and can run on any machine, plus this bytecode format also provides security. Any machine with Java Runtime Environment can run Java Programs.

Secured

When it comes to security, Java is always the first choice. With java secured features it enables us to develop a free, temper free system. Java program always runs in a Java runtime environment with almost null interaction with system OS, hence it is more secure.

Robust

Java makes an effort to eliminate error-prone codes by emphasizing mainly on the compiler time error checking and runtime checking. But the main areas which Java improved were Memory Management and mishandled Exception by introducing automatic Garbage Collector and Exception Handling.

Architecture neutral

The compiler generates bytecode, which has nothing to do with particular computer architecture, hence a Java program is easy to interpret on any machine.

Portable

Java bytecode can be carried to any platform. No implementation-dependent features. Everything related to storage is predefined, for example, the size of primitive data types

High Performance

Java is an interpreted language, so it will never be as fast as a compiled language like c or c++. But, Java enables high performance with the use of a just-in-time compiler.

Multithreaded

Java multithreaded feature makes it possible to write a program that can do many tasks simultaneously. The benefit of multithreading is that it utilizes the same memory and other resources to execute multiple threads at the same time, like while typing, grammatical errors are checked along.

Distributed

We can create distributed applications in java. RMI and EJB are used to create distributed applications. We may access files by calling the methods from any machine on the internet.

Interpreted

An interpreted is needed in order to run Java programs. The programs are compiled int Java Virtual Machine code called bytecode. The bytecode is machine-independent and is able to run on any machine that has a Java interpreter. With Java, the program need only be compiled once, and the byte code generated by the Java compiler can run on any platform

Java Advantages

  • Java is Simple
  • Java is Object-oriented because programming in Java is centered on creating objects, manipulating an object, and making objects working together. This allows you to create modular programs and reusable code.
  • One of the significant advantages of Java programs is Platform independent
  • Java is secure: Java is one of the first programming languages to consider security as part of its design.
  • Java is Multithreaded: Multithreaded is the capability for a program to perform several tasks simultaneously with a program.
  • Java is Robust: Robust means reliable and no programming language can really assure reliability.

Java Disadvantage

  • Java can be perceived as significantly slower and more memory-consuming than natively compiled language such as c or c++
  • No local constants. In Java, variables that belong to a class can be made constant by declaring them to be final. variable that is local to a method can not be declared final, however.
  • Java predominantly a single-paradigm language. However, with the addition of static imports in Java 5.0, the procedural paradigm is better accommodated than in earlier versions of Java.

Top comments (0)