title: Modifying variable value from method
body: <p>was wondering where im going wrong, any ideas? </p>
  
  <p>Modifying variable value from method</p>
  
  <p>Implement a method empty() in the TicketMachine class that simulates the effect of removing all money from the machine
  It should have a void return type and the body should simply set the total variable/field to zero. </p>
  
  <p>Does this method need any parameters? No </p>
  
  <p>Is this method a mutator or accessor? mutator</p>
  
  <p>Paste the whole method into the space below</p>
  
  <pre><code>public void empty(int return) 
  { 
  balance = 0; 
  }
  </code></pre>
  
  <p>Mark: 0 out of 3</p>
  
  <p>Comments:</p>
  
  <pre><code>* Test 1 (0.0 out of 3)
  
  
  
  TicketMachine.java:26: &lt;identifier&gt; expected
    public void empty(int return)
                          ^
    TicketMachine.java:60: ')' expected
    }
    ^
    2 errors
  </code></pre>
  
  <p>The output should have been:</p>
  
  <pre><code>      No it doesn't need parameters 
         and it is a mutator
        TicketMachine emptied successfully
  </code></pre>
  
  <p>This is what was actually produced:</p>
  
  <pre><code>      Exception in thread "main" java.lang.NoClassDefFoundError: TicketMachine
  </code></pre>