title: Get the string with the highest value in java (strings have the same 'base' name but different suffixes)
body: <p>I have a list with some strings in it:</p>
  
  <pre><code>GS_456.java
  GS_456_V1.java
  GS_456_V2.java
  GS_460.java
  GS_460_V1.java
  </code></pre>
  
  <p>And it goes on. I want a list with the strings with the highest value:</p>
  
  <pre><code>GS_456_V2.java
  GS_460_V1.java
  .
  .
  .
  </code></pre>
  
  <p>I'm only thinking of using lots of for statements...but isn't there a more pratical way? I'd like to avoid using too many for statements...since i'm using them a lot when i execute some queries...</p>
  
  <p>EDIT: The strings with the V1, V2,.... are the names of recent classes created. When someone creates a new version of GS_456 for example, they'll do it and add its version at the end of the name.</p>
  
  <p>So, GS_456_V2 is the most recent version of the GS_456 java class. And it goes on.</p>
  
  <p>Thanks in advance.</p>