CircleAreaApp.java Source code

Java tutorial

Introduction

Here is the source code for CircleAreaApp.java

Source

import java.util.Scanner;

public class CircleAreaApp {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        System.out.print("Enter the radius of your circle: ");
        double r = sc.nextDouble();
        double area = Math.PI * (r * r);
        System.out.println("The area is " + area);
    }
}