What is Java? Java is a general-purpose, class-based, object-oriented programming language designed for having lesser implementation depend...
What is Java?
Java is a general-purpose, class-based, object-oriented programming language designed for having lesser implementation dependencies.
- It is most popular language created in 1995.
- over 3 billion devices run java and it owned by oracle
- mobile application specially android apps
- desktop applications
- web application
- web server and application servers
- games
- database connection
Benefits of Java
- java works on multiple platform like Window ,Mac ,Linux, Raspberry P
i, and many more - easy to learn and use
- open source and free
- secure fast and powerful
- huge community support over millions of developers
- object oriented language which gives a clear structure to programs and allows code to be reused, lowering
- development costs
- closed to C++ and C# ,it makes programmer to switch to java and vice-versa
Simple program printing Hello World
Every line of code that runs in Java must be inside a class. Here "main" is our class.
Java is case-sensitive so Main and main are different for java complier.
The output of above example as show as below :
Here javac main.java is use to compile main.java code. If no any error shown during compilation process you can run code using java main command in cmd prompt or on VSCode.
COMMENTS