Error using other classes
Posted: Wed Mar 17, 2004 2:05 am
Ok, so i used to have a class called EasyIn that i used all the time for getting the users input from the keyboard. Now i've been trying to use this file again for another class and i get some weird error messages.
Heres the file i'm using the EasyIn class in.
and heres the errror message i'm recieving when i go to compile it. This code has worked before in the past in many different classes. The easyIn files are also located in the same directory as EvenOrOdd.java /class files.
D:\WORK\YEAR2\JAVA\EvenOrOdd.java:12: cannot resolve symbol
symbol : variable EasyIn
location: class EvenOrOdd
numberToCheck = EasyIn.getInt();
^
1 error
Tool completed with exit code 1
CHEERS for any help people can offer. THis is really starting to annoy me!
Only change to the system have been when i installed DJ Decompiler although this has been uninstalled now. I've tried re-installing java but no luck and so i'm just wondering if its a problem with Textpad.
Cheers once again
Andy
Heres the file i'm using the EasyIn class in.
Code: Select all
class EvenOrOdd
{
/*
* A class that simply tests whether the input is odd or even
* @author Andy Townsend
* @version 1.0 (12/01/04)
*/
public static void main(String[]args)
{
int numberToCheck;
System.out.println("Please enter a number: \t");
numberToCheck = EasyIn.getInt();
if(numberToCheck % 2 == 1)
{
//odd
System.out.println("That number was odd");
}else
{
//even
System.out.println("That number was even");
}
}
}
D:\WORK\YEAR2\JAVA\EvenOrOdd.java:12: cannot resolve symbol
symbol : variable EasyIn
location: class EvenOrOdd
numberToCheck = EasyIn.getInt();
^
1 error
Tool completed with exit code 1
CHEERS for any help people can offer. THis is really starting to annoy me!
Cheers once again
Andy