History of java

History of java

History of Java

History of Java

Java is a computer programming language. It is a general-purpose, object-oriented, portable, secure, and platform-independent language. It was initiated in 1991 by James Gosling, Mike Sheridan, and Patric Naughton. Java was initially called Oak after an Oak tree. Later it named Java. In the year 1995 Sun Microsystems released Java 1.0 and it was based on WORA(Write once Run Any ware) or we can say platform-independent.  

Arthur van Hoff was the person who re-wrote Java 1.0 compiler strictly adheres to Java 1.0 specification. In December 1998 Java 2 was released by codename Playground and it has major changes. Java 2 name was changed to J2SE.


In the year 2000 J2SE 1.3 was released with code name Kestrel and it has bundled with Hotspot JVM, JavaSound, Java Naming, JNDI, and Java platform debugger architecture. In the year 2002 J2SE 1.4 released with code name Merlin, it has included regular expression modeled after PERL. 

In 2004-2005 J2SE 1.5 released with codename Tiger. In this version, several new features were included like a for-each loop, Generics, autoboxing, and var-args.In 2006 Java SE 6 and dropped zero, with code name Mustang. It has bundled with a database manager and facilitates scripting language with JVM.Java SE 7 with the codename Dolphin in 2011 with new features added such String in switch-case and it supports dynamic language. 

In 2014 Java SE 8 was released with lambda expression with code name Spider. The latest released Java SE 9 with Jigsaw as its code name.  

The newest version of Java is Java-14, released in March 2020, and Java 11, a currently supported long-term support (LTS) version, released on September 25, 2018. The Oracle Corporation discharged for the Java 8 LTS the last free open update in January 2019 for business use, while it will in any case despite everything bolster Java 8 with open updates for individual utilize something like in any event December 2020. Prophet (and others) energetically suggest uninstalling more seasoned renditions of Java as a result of genuine dangers because of uncertain security issues. Since Java 9, 10, 12, and 13 are no longer supported. 

Major release versions of Java, along with their release dates:


  • JDK 1.0 (January 23, 1996)
  • JDK 1.1 (February 19, 1997)
  • J2SE 1.2 (December 8, 1998)
  • J2SE 1.3 (May 8, 2000)
  • J2SE 1.4 (February 6, 2002)
  • J2SE 5.0 (September 30, 2004)
  • Java SE 6 (December 11, 2006)
  • Java SE 7 (July 28, 2011)
  • Java SE 8 (March 18, 2014)
  • Java SE 9 (September 21, 2017)
  • Java SE 14 (March 14, 2020) 

There were five major criteria for the creation of this wonderful language which are as follows:

  • Must be an Objected Oriented.
  • Must be a secure and robust language.
  • Must be portable and architectural neutral which means Java application runs anywhere in networks as it generates bytecode which runs on any OS and networks provided JVM is there.
  • Must be high performance
  • It must be multithreaded

Few features of Java.

  • General Purpose
  • Object-oriented
  • Class-based
  • Cross-Platform
  • Portable
  • Architecturally neutral
  • Multithreaded
  • Dynamic
  • Distributed
  • Interpreted Programming Language
  • Here emp1 and emp2 are reference data types




More Post
Java Data Types

JAVA QUESTIONS AND ANSWERS FOR BEGINNERS 

Java Data Types

Java Data Types

Java data types

Data Types in Java

Data types are used to identify the types of data in a program. It means what kind of data usage is going to put into a memory location.
In Java, there are two categories of data types
  •    Primitive data types(Pre-define)
  •    Reference data types(Non-primitive)

Primitive data types:

It loads automatically into the memory as soon as Java program executes. Primitives single a single value. Primitive data types are predefined by the language and named by a keyword. 
There are eight primitive data types and it can be divided into four groups.
  1. Integer (byte, short, int, double)
  2. Floating or real number (float, double)
  3. Character (char and it is 16-bit Unicode character)
  4. Boolean (Boolean)


Type
Size
Range of values that can be stored
Default Value
byte
1 byte
−128 to 127
0
short
2 bytes
−32768 to 32767
0
int
4 bytes
−2,147,483,648 to 2,147,483,647
0
long
8 bytes
9,223,372,036,854,775,808 to
9,223,372,036,854,755,807
0L
float
4 bytes
3.4e−038 to 3.4e+038
0.0f
double
8 bytes
1.7e−308 to 1.7e+038
0.0d
char
2bytes
\u0000 to \uFFFF(Maximum Value-65535)
Null(‘\0’)
Boolean
1 bit
true or false
false

Data Types in java
Java Data Types

Examples:

class JavaDataTypesExample{
     public static void main(String args[])
     {
        byte byteVar = 12;
        short shortVar = 37;
        int intVar =80;
        long longVar =898034892149L;
        float floatVar = 20.563423424f;
        double doubleVar = 20.12323423423468326;
        boolean booleanVar = true;
        char charVar ='A';
   
        System.out.println("Value Of byte Variable is       " + byteVar);
        System.out.println("Value Of short Variable is      " + shortVar);
        System.out.println("Value Of int Variable is        " + intVar);
        System.out.println("Value Of long Variable is       " + longVar);
        System.out.println("Value Of float Variable is      " + floatVar);
        System.out.println("Value Of double Variable is     " + doubleVar);
        System.out.println("Value Of boolean Variable is    " + booleanVar);
        System.out.println("Value Of char Variable is       " + charVar);
     }
 }


Outputs:
Value Of byte Variable is       12
Value Of short Variable is      37
Value Of int Variable is        80
Value Of long Variable is       898034892149
Value Of float Variable is      20.563423
Value Of double Variable is     20.123234234234683
Value Of boolean Variable is    true
Value Of char Variable is       A

Reference Data types:

Non-Primitive or Reference data types are formed with the help of primitive data types. It is created by the programmer. It stores the memory address of an object.  The default value of any reference variable is null. Example classes, interface, Arrays, String.
class Employee
{
   String name;
    String aadhar;
    String emailAddress;
    int yearOfBirth;
}
class EmpDetail
{
public static void main(String[] args) {
        Employee emp1 = new Employee(); // Reference Data type
        emp 1.name = "Habib";
        emp 1.aadhar = "4525-4545-4345-3423";
        emp 1.emailAddress = "habib@abc.com";

        Employee emp2 = new Employee();// Reference Data type
        emp 2.name = "Sachin";
        emp 2. aadhar = "4563-7384-9031";
        emp 2.yearOfBirth = 1974;

        System.out.println("Name: " + emp 1.name);
        System.out.println("Aadhar: " + emp 1.aadhar);
        System.out.println("Email Address: " + emp 1.emailAddress);
        System.out.println("Year Of Birth: " + emp 1.yearOfBirth);

        System.out.println("Name: " + emp 2.name);
        System.out.println("Aadhar: " + emp 2.aadhar);
        System.out.println("Email Address: " + emp2.emailAddress);
        System.out.println("Year Of Birth: " + emp2.yearOfBirth);

    }
}


Here emp1 and emp2 are reference data types