You are here: Home / Topics / Import with * sign example in Java

Import with * sign example in Java

Filed under: Java on 2023-09-17 15:40:07

//  import with * sign.

import  java.util.*;

class  ImportTest2
{
public static void main( String args[ ] )
{
 double r, a;
 Scanner sc = new Scanner( System.in );
 
 System.out.print("Enter Radius : ");
 r = sc.nextDouble();
 
 a = 3.14 * r * r;
 
 System.out.println("Area of Circle : " + a);
}
}


Output:

Enter Radius : 10
Area of Circle : 314.0

About Author:
S
Shyam Dubey     View Profile
If you are good in any field. Just share your knowledge with others.