title: cannot resolve or is not a field error
body: <p>I am trying to search an arraylist of objects for an ID code, but I am stuck.</p>
  
  <pre><code>import java.util.Scanner; 
  import java.util.ArrayList;
  
  public class Homework01{
  
     public static void main(String[] args){
        ArrayList&lt;Transaction&gt; argList = new ArrayList&lt;Transaction&gt;();
  
        Scanner input = new Scanner(System.in);
        System.out.println("Transaction List Menu");
        System.out.println("=====================");
        System.out.println("1) Add Transaction.");
        System.out.println("2) Search Transactions.");
        System.out.println("3) Filter.");
        System.out.println("4) Display All Transactions.");
        System.out.println("5) Exit.");
        int menu = input.nextInt();
  
        while (menu != 5) {
           switch (menu) {
              case 1: 
                 addTransaction(argList);
                 break;
              case 2: 
                 ;// Search Transaction
                 break;
              case 3: 
                 ;// Filter Withdraws and Deposits
                 break;
              case 4: 
                 ;// Display transactions
                 break;
              case 5: 
                 System.out.println("End");
                 break;
              default: 
                 System.out.println("Invalid response");
                 break;
           }
           menu = input.nextInt();
        }     
     }
  
     public static void addTransaction(ArrayList&lt;Transaction&gt; argList) {
        Scanner input = new Scanner(System.in);
        int tempId;
        double tempAmount;
        char tempType;
        String tempDescription;
        System.out.println("Enter in an ID for the transaction: ");
        tempId = input.nextInt();
        System.out.println("Enter in the amount of money: ");
        tempAmount = input.nextDouble();
        System.out.println("W for withdraw, D for deposit: ");
        tempType = input.next(".").charAt(0);
        System.out.println("Give transaction a description: ");
        tempDescription = input.next();
        //add transaction
        argList.add(new Transaction(tempId, tempAmount, tempType, tempDescription)   );    }
  
     public static void searchTransactions(ArrayList&lt;Transaction&gt; argList){
        Scanner input = new Scanner(System.in);
        System.out.println("Please type in transaction ID: ");
        int searchId = input.nextInt();
        for(int i=0;i&lt;argList.size();i++){
           if(argList.argId.get(i).contains(searchId)){
              System.out.println("Yes");
           }
        }    
     } 
  }
  </code></pre>
  
  <p>My second file contains this</p>
  
  <pre><code>public class Transaction {
  int id;
  char type;
  double amount;
  String description;
  
  public Transaction(int argId, double argAmount,char argType, String 
  argDescription){
  
    id = argId;
    type = argType;
    amount = argAmount;
    description = argDescription;
  }
  
  public void getId(int id){
  
  }
  public void getAmount(double amount){
  
  }
  public void getType(char type){
  
  }
  public void getDescription(String description){
  
  }
  
  }
  </code></pre>
  
  <p>And i get the error message: argId cannot be resolved or is not a field on line 58. I think my error is that argId is not part of the ArrayList, and i need to find the right tern to search the ID codes in the ArrayList. </p>
  
  <p>Thanks</p>