title: Can you use .slice while parsing to an int?
body: <pre><code>int ticket = Integer.parseInt(testTicket.slice(0, -1));
  </code></pre>
  
  <p>As seen in the code above, I'm trying to parse a string while also using slice to remove the last digit. While I could certainly add additional lines of code to get it done, I don't see any reason why the above shouldn't work.</p>
  
  <p>When I try and use the above code, I get a compiler error:</p>
  
  <pre><code>  TicketNumber.java:25: error: cannot find symbol
        int ticket = Integer.parseInt(testTicket.slice(0, -1));
                                                ^
    symbol:   method slice(int,int)
    location: variable testTicket of type String
  </code></pre>
  
  <p>I don't know why it's not working and I think it's worth finding out so that I can make sure whatever is causing the error doesn't show up in my other programs.</p>