title: how do i write this method that returns the larger string?
body: <p>I am completely new to programming (java) and our teacher asks us to make some excercises in my programming lab.</p>
  
  <p>Now I can't seem to find out how to write the correct method. 
  This is the question:
  Write a method  max that has two string  parameters  and returns the larger  of the two. </p>
  
  <p>I have</p>
  
  <pre><code>String string1, string2;
  public max Strings(string1.length(), string2.length())
  {
      if (string1.length()&gt;string2.length)
      {
      return string1;
      else if (string1.length()&lt;string2.length)
          return string2;
      }
  }
  </code></pre>