title: Breaking apart a String using IndexOf and substring without using split or a loop
body: <p>Let's say I have an email address. Like: kate.daniels@somecompany.com.<br>
  And I need to break it apart without using split or loops. And that I need to use <code>IndexOf</code> in combination with substring and not using a loop (this will come later after I have a strong understanding of this first).</p>
  
  <p>But looking at this email address with the understanding the email addresses are formatted like: <code>(firstName + "." + lastName + "@" + companyName + ".com")</code></p>
  
  <pre><code>emailAddress = input.nextLine();
  //  This is where I have issues.
  firstName = emailAddress.substring(emailAddress.IndexOf(".") );
  
  // How do I get this to be just the last name and not lastName + "@somecompany.com"
  lastName = emailAddress.substring(emailAddress.IndexOf(".") + 1);
  
  // And how do I get the company name without the ".com"
  companyName = emailAddress.substring(emailAddress.IndexOf("@") + 1);
  </code></pre>
  
  <p>Thank you for any help you can provide. I can see how this would be very helpful and would like to learn.</p>
  
  <p>I have looked through and I have not seen a response to my question.</p>