Search:

Type: Posts; User: JavaPF

Search: Search took 0.10 seconds.

  1. [SOLVED] Re: checking if it is a character?

    Brilliant! Glad I could help Luke.

    If you have no further questions, please can you mark this thread as solved. (Check the link in my signature)

    Thanks!!
  2. [SOLVED] Re: checking if it is a character?

    This can easily be done with an if statement:



    if(yourInt > 0 && yourInt <= 40){
    System.out.println("Your value is greater than 0 and less or equal to 40");...
  3. [SOLVED] Re: checking if it is a character?

    Take a look at this luke.

    If the user enters a non Integer value, the exception is caught and the ScannerStuff() method is run again.

    The 2 Integers myInt & yourInt are compared once a user...
  4. [SOLVED] Re: checking if it is a character?

    Yes there is. You can use a while loop:



    import java.util.Scanner;

    public class Main2 {

    public static void main(String[] args) {
  5. [SOLVED] Re: checking if it is a character?

    Hello luke,

    The reason you are getting this error is because you are using int name = sc.nextInt();

    For a start, the variable 'name' is an Integer so needs to have an Integer value assigned.
    ...
Results 1 to 5 of 5