Java Tutorials:


  What is Java:

Java is a programming language .
Java is a high level, robust, secured and object-oriented programming language.

 Where to Used: 

According to Sun, 3 billion devices run java. There are many devices where java is currently used. Some of them are as follows:
  1. Desktop Applications such as acrobat reader, media player, antivirus etc.
  2. Web Applications such as irctc.co.in etc.
  3. Enterprise Applications such as banking applications.
  4. Mobile
  5. Embedded System
  6. Smart Card
  7. Robotics
  8. Games etc



 Why to Used:


1. High Level Language
2. Robust
3. Secure
4. Platform Independent
5. Object Oriented





Java Example:

Source Code:

  1. class Simple{  
  2.     public static void main(String args[]){  
  3.      System.out.println("Hello Java");  
  4.     }  
  5. }                     Output: Hello Java  


                                Diff. B/w  Java  and C++:

           Java                                                                                                     C++

 Java is pure Object oriented language.                                 C++ is not pure object oriented language.
Java does not support  pointers.                                            C++ support pointers.
Java  does  not support  Multiple Inheritance.                         C++ support multiple inheritance.   
Write Once, Compile Any Where(WOCA).                           Write Once Run Any time.(WORA) 
 Java doesn't  provide global variables.                                    C++ provide global variables.

Java doesn't provide header files.                                            C++ has header files.

Java doesn't provide template class.                                     C++ support  template class.

Java uses compiler and interpreter both                               C++  has only Compiler.
Java  does  not support  Operator Overloading.                  C++ support operator overloading.
There is no go to statement in Java                                     C++ support go to statement.




Note:
Java was originally designed  by James Gosling and developer by Sun Microsystem (which has since been acquired by Oracle Corporation) and released in 1995