i'm a new to java and just bought this amazing book to start learning with. One of the exercises, it asked me to do this ( it's exactly like in the book ) :
class SimpleDotComTestDrive {
public static void main (String[] args) {
SimpleDotComTestDrive hu = new SimpleDotComTestDrive();
int[] locations = {2,3,4};
hu.setLocationCells(locations);
String userGuess = "2";
String result = hu.checkYourself(userGuess);
String testResult = "failed";
if (result.equals("hit") ) {
testResult = "passed";
}
System.out.println(testResult);
}
}
I compiled this code on Notepad++ which compiles normally for the pass few weeks , until i compiled this code and got this error :
SimpleDotComTestDrive.java:8: error: cannot find symbol
hu.setLocationCells(locations);
^
symbol: method setLocationCells(int[])
location: variable hu of type SimpleDotCom
SimpleDotComTestDrive.java:12: error: cannot find symbol
String result = hu.checkYourself(userGuess);
^
symbol: method checkYourself(String)
location: variable hu of type SimpleDotCom
2 errors
It's pretty annoying since I've searched over the internet for the past few hours and couldn't fix it, please, if you have any idea what's wrong with this then please let me know as soon as possible, thanks in advance !!!
LOOK !!! i know notepad++ isn't the best IDE but the book recommended me to use simple IDE for learning purposes so please, don't ask me to use other IDE, thanks !