What is Java?
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language.
It is used for:
- Mobile applications (specially Android apps)
- Desktop applications
- Web applications
- Web servers and application servers
- Games
- Database connection
- And much, much more!
Why use Java?
- Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
- It is one of the most popular programming languages in the world
- It has a large demand in the current job market
- It is easy to learn and simple to use
- It is open-source and free
- It is secure, fast and powerful
- It has huge community support (tens of millions of developers)
- Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
- As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa.
First Java program
1 2 3 4 5 6 7 | // A Java program to print "Hello World" public class Wrap { public static void main(String args[]) { System.out.println("Hello World"); } } |
Output:
1 | Hello World |