Here's what I see:
public static void main(String[] args) {
So far, so good - you're declaring your main method in your class (I assume you've wrapped this in a class definition?)
int number;
System.out.print("Enter a number in the " + "range of 1 - 10: ");
You're declaring an int
named number. It's not assigned to anything yet, so it will initialize to 0. Then you're outputting something to the console. Nothing wrong so far.
value = input("'Please Enter a Number between 1 and 10 (1-10)'");
Whoa, wait a second - what's value
? This variable isn't defined anywhere so far (is it a class variable you haven't pasted into your question? Or is this your first error? You need to define what value is. Also, you're using a function named input
- where is this defined?
while ( value < 1 || value > 10)
Here, you've stared a while
loop on value, but there is no loop contents. You'll want to do some reading on how a while loop works.
}
Whew, at least your main function has a closing brace. I recommend aligning this brace with the beginning of the method declaration (in this case, the p
in public
).
I hope this helps somewhat. It sounds like this may lead to a lot more questions though, so you'll want to clarify with your course instructor some of the basics of java.