title: "illegal start of expression" using an if && statement inside of a boolean
body: <p>I don't know if it's because of the way I formatted the accesor methods or if you're just not allowed to use an if &amp;&amp; statement in this situation but I just can't seem to figure out why I keep getting these two errors when trying to compile my code. Please help.</p>
  
  <p>BankAccount.java:13: error: illegal start of expression
          if(id2.equals(c.getId()))&amp;&amp; pin2.equals(c.getPin())v = true;
                                   ^
  BankAccount.java:13: error: ';' expected
          if(id2.equals(c.getId()))&amp;&amp; pin2.equals(c.getPin())v = true; 
                                                                     ^ </p>
  
  <pre><code>public class BankAccount
  {
  private double balance;
  private Customer c;
  private boolean v;
  
  public BankAccount(){
      balance=100;
      c=new Customer();
  }
  
  public boolean ValidAccount(String id2, String pin2){
      if(id2.equals(c.getId()))&amp;&amp; pin2.equals(c.getPin())v = true;
  }
  
  public BankAccount(Customer c1, double initial){
      balance=initial;
      c=c1;
  }
  public double checkBalance(){
      return balance;
  }
  
  public void deposit(double money){
      balance+=money;
  }
  
  public void withdraw(double money){
      balance-=money;
  }
  
  public Customer getCustomer(){
      return c;
  }
  public String toString(){
      return "" + c.getFirstName() + " "+ c.getFirstName() + balance + " " + 
  c.getId() + " " + c.getPin(); 
  
  }
   }
  </code></pre>