Question: This is my `show()` method for `UsersController`

```
import views.html.*;

public static Result show(Long id)
{
  User user = User.findById(id);

  return ok(views.html.users.show.render(user));
}

```

However, IntelliJ marks `show` as red and cannot find the symbol.

I already did `activator compile` and is `target` folder already has object `show.template.scala`. 

Can anyone help me figure out what the problem is and how to fix it?

Answer: 
Because once you authorize the user in the first `if` statement, you fall through and test the second `if` statement. Similarly, if you were to put in invalid credentials, you would get the error message twice (once for the first if/else block and again for the second if/else block).

Try simplifying it a bit:

```
if (pass.equals("mightyducks") && user.equals("alex")) {
    System.out.println("You are now logged into the system!"); 
} else if (user.equals("emily") && pass.equals("cat")) {
    System.out.println("You are now logged into the system!");
} else {
    System.out.println("Your username or password was invalid!");
}

```

There are ways to make that a bit simpler by collapsing the first two tests, but I wanted to keep it this way to illustrate how the if/else parts work.
No need to make more if else block .as Java provide else if. below code can work for you.

```
import java.util.Scanner;

public class Match_Name_Pass 
{
    public static void main(String[] args) 
     {
       Scanner scn = new Scanner(System.in);
       System.out.println("Enter the user name : ");
       String username = scn.next();
       System.out.println("Enter the password");
       String password = scn.next();

       if(username.equals("alex")  && password.equals("mightyducks") )
        {
        System.out.println("You are now logged into the system!");
        }
       else if(username.equals("emily") && password.equals("cat"))
        {
        System.out.println("You are now logged into the system!");
        }
       else
       {
        System.out.println("Your username or password was invalid!");
       }
    }
}

```