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:
- Desktop Applications such as acrobat reader, media player, antivirus etc.
- Web Applications such as irctc.co.in etc.
- Enterprise Applications such as banking applications.
- Mobile
- Embedded System
- Smart Card
- Robotics
- Games etc
Why to Used:
1. High Level Language
2. Robust
3. Secure
4. Platform Independent
5. Object Oriented
Java Example:
Source Code:
- class Simple{
- public static void main(String args[]){
- System.out.println("Hello Java");
- }
- } 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