Basic Java programs for beginners

  • Java Program to find the area of a circle
public class Main {

    public static void main(String[] args) {
    System.out.println("Enter the radius of the circle to find it's area:");
    Scanner input= new Scanner(;
    int a=input.nextInt();
    float  area= 3.14f* a*a;
    System.out.println ("The area of the given circle is: "+area);

To create classes or objects
public class MyClass {
int x = 10;
public static void main(String[] args) {
MyClass myObj1 = new MyClass();
MyClass myObj2 = new MyClass();
You can check out more such tutorials on Not only Java but you can find WordPress, HTML, CSS projects. One such is Student Result Management System using PHP and MySQL.