String equals in andriod studio : 
Was just wondering why I get "Cannot resolve symbol 'equals'" on the string.equals. Im using andriod studio.

    
public class Transaction {

    String type;
    double amount;

    if(type.equals("Deposit"){


    };


}