Java Introduction

Java was developed by sun microsystems Inc, in the year 1991, Later acquired by oracle corporation. it was developed by James Gosling and Patrick Naughter. It helps to create resuable code and modular programs.
Java is a class based, object oriented programming language and is designed to have as implementation dependencies as possible. A general purpose programming language made for developers to write once run anywhere that is compiled java code can run on all platforms that support java.


Features of Java
1. Platform Independent:- compiler convert source code to byte code and then the JVM executes the byte code generated by the compiler this bytecode can run on platform.
2.Object oriented programming language:- organising the program in the terms of collection of objects is a way of object oriented programming, each of which represents an instance of class.
four main concepts of object oriented programming are:- 
    a) Abstraction   b) Inheritance   c) Encapsulation  d) Polymorphism
3. Simple:- Java is one of the simple languages as it does not have complex features like pointers, operator overloading, multiple inheritance, explicit memory allocation.
4. Robust:- Java Language is Robust that means reliable. it is developed in such a way that it puts a lot of effort in checking of errors as early as possible. the main features of java that make it robust are garbage collection, exception handling and memory allocation.
5. Secure:- In java, we don't have pointers, and so we cannot access out of bound arrays i.e it shows ArrayIndexOutOfBoundException. if we try to do so, thats why several security flaws like stack corruption or buffer overflow is impossible to exploit in java.
6.  Distributed :- We can create distributed applications using java programming language. the java programs can be easily distributed on one or more systems that are connected to each other through an internet connection.
7.Multithreading: -Java Supports multithreads. It  is a java features that allows concurrent execution of two or more parts of a program for maximum utilization of CPU.
8. Portable:- the platform independent feature of java in which its platform independent byte code can be taken to any platform for execution makes java portable.

                First Java  Program

  import java.io.*
  class Welcome{
   public static void main(String[] args){
     System.out.println("Hello DataDeeds");
  }
}

Class:- The class contains the data and methods to be used in the program. Methods define the behaviour of class.
Static:- static keywords tells us that this method is accessible without instantiating the class.
Void:- void keyword tells that this method will not return anything.
Main() - main() method is the entry point of our application.

Comments

  1. its basic but very good collective information .
    Thanks DataDeeds , its really helpful for all of us.

    ReplyDelete

Post a Comment