I know I am missing something when I try to run it it says that it doesn't contain a main type. I am probably missing something really easy but here is what I have.

public class Cube 
{
    public static void main() 
    {

          double height = 3.0;
          double cube_volume = height * height * height; 
          double surface_area = 8 * height; 

          System.out.println("Volume = " + cube_volume);
          System.out.println("Surface area = " + surface_area);
    }
}

It is : main(String [] args) Also I think that you have the formula for surface_area wrong

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.