0

i couldn't run the program

import java.util.Scanner; public class Areaofcircle{ public static void main(String[] args){ final float PI=3.14f; //aba float ko value change hudaina kailai Scanner object = new Scanner(System.in); System.out.println("ENTER RADIOUS"); float radious = object.nextFloat(); float AOC = PI*(radious*radious); System.out.println("The area of circle is " +AOC); } }

1st May 2020, 1:53 PM
SASIM WD
SASIM WD - avatar
3 Respostas
+ 3
You should Import package before declaring the Class.
1st May 2020, 1:54 PM
A͢J
A͢J - avatar
+ 1
put the import at the top of the class
1st May 2020, 2:16 PM
tres
- 1
(Sorry i posted the wrong, code. ) even i had declare the import package before the class. Error occurred
1st May 2020, 2:28 PM
SASIM WD
SASIM WD - avatar