Advertisement
advictoriam

Untitled

Jan 15th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. public class InitialsCheck
  2. {
  3.    /**
  4.       Gets the initials of this name
  5.       @params first, middle, and last names
  6.       @return a string consisting of the first character of the first, middle,
  7.       and last name
  8.    */
  9.    public static String getInitials(String one, String two, String three)
  10.    {
  11.       return String.format("%c%c%c",one.charAt(0), two.charAt(0), three.charAt(0));
  12.    }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement