#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    error: cannot find symbol


    Hi anyone,
    I am very new to Java and have a problem with the application below that throws up the error 'cannot find symbol'. I would appreciate any advice.

    public class Exponent1 {
    public static void main(String[]args) {
    int entry;
    Scanner keyBoard = new Scanner(System.in);
    System.out.print("Enter an integer ");
    entry = keyBoard.nextInt();
    squareNumMethod();
    cubeNumMethod();
    }
    public static int squareNumMethod() {

    System.out.println("The square of the integer is " + (entry * entry));
    }
    public static int cubeNumMethod() {
    System.out.println("The cube of the integer is " + (entry * entry * entry));

    }
    }

  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,696
    Rep Power
    347
    error 'cannot find symbol'
    Please copy the full text of the error messages and post it here so we know what symbol is not found.

    Also please wrap the code in code tags.

IMN logo majestic logo threadwatch logo seochat tools logo