Introduction

description of image


Tips for freshers


We have an important tip for you.the only way you can get better at programming is by writing code.To make the learning experience more effective and enjoyable, use your offline java compiler to execute the code to get better results.



"Hello world" program


● Lets' create a program called "Hello World". it is a simple program that displays "Hello World" on the screen.

● copy the below code and paste it your java compiler.

Working of the program

1.Starting Class


class Main {
.....
}

In Java,every application begins with a class definition.Here, we have named our class Main


2.The main() Method


public static void main(String[] args){
.....
}

The main() method is the entry point of the program.A vaild Java program must include this method


3.System.out.println()


System.out.println("Hello world");

This code prints the text Hello World .semicolon ; is mandatory for this method.

Note


● Every valid Java program must have a class
● The main() method must be inside the class definition.This will be the starting point of our program

Animated Portfolio Website HTML CSS JS | Codehal

Greetings, I am James Gosling

I am the creator of Java

Java



Quiz


Question Text