Link to home
Start Free TrialLog in
Avatar of dynamicOne
dynamicOne

asked on

Java Error

I have a simple java program with an error on line 14 and the code looks fine. What am I missing?

public class Carpet
//  This application performs arithmetic with two integers
{
  public static void main(String[] args)
  {
    int carpetLength = 14;
    int carpetWidth = 11;
      double carpetPrice = 3.75;
    System.out.print("Length of the carpet is " + carpetLength);
      System.out.println("ft");
      System.out.print("Width of the carpet is " + carpetWidth);
      System.out.println("ft");
      System.out.println("Price for square foot is $" + carpetPrice);
      product = carpetLength * carpetWidth;
      System.out.println("Cost for carpeting the room is $" + product * carpetPrice);
  }
}
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dynamicOne
dynamicOne

ASKER

Thank you, I appreciate it!
Not a problem, glad to help!