Q:

Use Math class to calculate

Write a JAVA program that calculates the surface area of a cylinder, C= 2( π r2) + 2 π r h, where r is the radius and h is the height of the cylinder. Allow the user to enter in a radius and a height. Format the output to three decimal places. Use the constant PI and the method pow() from the Math class.
This is what I've done so far but it can not run. Can anyone help me ?
import Java.util.Scanner;

public class Ex5 {

    public static void main (String[] args)
    {
      Scanner input=new Scanner(System.in);
      double radius,height,area;
      System.out.print("Please enter the radius of the Cylinder");
      radius = input.nextDouble();
      System.out.print("Please enter the height of the Cylinder");
      height = input.nextDouble();
      area = (4*Math.PI*radius)+2*Math.PIMath.POW(radius,2);
      System.out.println("The surface of the cylinder" + area);  
    }
}

A:

If this is the source code verbatim, then there are quite a few issues here.
First, The line:
2*Math.PIMath.POW

You forgot to put an asterisk between PI and Math, so the compiler sees PIMath as a symbol.
It might be good to put parentheses to see this:
2*(Math.PI)*(Math.pow(radius, 2))

Note that Math.PI is a statically referenced constant. Math.pow, on the other hand, is a method.
All identifiers in Java are case sensitive. Math.pow exists, Math.POW does not.
Also, I've noticed that you are not using the height variable at all, so your formula  calculation is incorrect.

