title: Capitalizing first and last letter in java using String methods
body: <p>I'm a beginner in java and we were asked to that will capitalize the first and last letter of the word. </p>
  
  <p>[Hint: Capture the letter as a string (using the substring method) then use the toUpperCase() method.]</p>
  
  <p>all i have so far is this,</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Excercise6 {
     public static void main (String [] args){
  
      Scanner keyboard = new Scanner (System.in);
      System.out.print("Please Type a word: ");
      String word = keyboard.nextLine();
  
      int stringLength = word.length();
     String letter1 = word.substring (0,1);
     String lastletter = word.substring ((stringLength-1),(stringLength));
     String newWord =letter1.toUpperCase() + lastletter.toUpperCase();
  
  
      System.out.println("The word with first letter capitalized is: " + newWord );
  
     }
  }
  </code></pre>
  
  <p>How do I add the words between the first and the last letter??</p>