thanks for help so far - forgot to come back and respond at the time
i'm also having a couple of problems with the following
(missing return type and unreachable statment):
[highlight = Java]
import java.util.Scanner;
public class testMethod{
static Scanner sc = new Scanner(System.in);
public static void main (String []args){
boolean continueOrNot = true;
do
{
playGame();
}
while (continueOrNot);
}
public static void playGame()
{
int number = (int)(Math.random()*10)+1;
int guess = getGuess();
}
public static int getGuess()
{
boolean validInput=true;
while (!validInput)
{
int guess = sc.nextInt();
if ((guess <1) || (guess >10))
{
System.out.print("Wrong");
validInput = false;
}
else
{
return guess;
validInput = true;
}
}//end of while
}//end of getGuess method
}//end of class
[/highlight]