Search:

Type: Posts; User: ChristopherLowe

Search: Search took 0.12 seconds.

  1. Replies
    26
    Views
    2,357

    Re: Assignment Problem. Please help

    Not so. Code readability is important but clarity != short.



    Once again you are trying to use bitwise & for a logical statement. Please see Learning the Java Language > Language Basics >...
  2. Replies
    26
    Views
    2,357

    Re: Assignment Problem. Please help

    But that's not what it is doing:


    public static void methodswitch(String LetterSelection)

    The 'void' part of this method declaration means "I don't return anything". However this isn't the...
  3. Replies
    26
    Views
    2,357

    Re: Assignment Problem. Please help

    Regular expressions allow you to test if a string matches a certain pattern. They have their place but try and avoid them if there is an alternative. In your case a couple of if .equals() is more...
  4. Replies
    26
    Views
    2,357

    Re: Assignment Problem. Please help

    See Learning the Java Language > Language Basics > Operators

    & is bitwise AND
    && is logical AND.

    You want logical AND.



    You could use regular expressions but adding complexity to shorten...
Results 1 to 4 of 4