Introduction to Java

Introduction to Java

What is Java ?

Java is a high-level programing language which is used in for doing multiple tasks like app development ,software development and so on. In java all the code and stuff are categorized in the form of classes.

How to make a java class ?

Basically java class are made by saving your source code with .java extension.

Features of Java

  • Simple
  • Object oriented
  • Distributed
  • Multithreaded
  • Dynamic
  • Architecture neutral
  • Portable
  • High performance
  • Robust
  • Secure

Let us move forward towards creation of Hello world program using java class and how it is compiled and so on.

class HelloWorld {
public static void main() {
 system.out.println("Hello World");
}
  • Here HelloWorld is the name of Class .
  • main() is the method.
  • system.out.println() is the method for printing "Hello World"

In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes — the machine language of the Java Virtual Machine (Java VM). The java launcher tool then runs your application with an instance of the Java Virtual Machine