Java program to abbreviate a given name or a java program to print short form of a name or Printing the initials of a Name or First letters of each word of a name or Write a Java Program to Convert a person's name in abbreviated or Java Program to Accept a name and print the short form of the name or Print initials of a name or how to find short form of a name in java or a java program to print short form of a name.
Explanation:- Abbreviated or sort name both are same, let's take an example and try to understand a sort name or abbreviated name, I am taking an example of my full name, My full name is " Ghanendra Pratap Singh Yadav " then my Abbreviated or Sort Name will be G. P. S. Yadav. I think now you understand the Abbreviated and sort name now comes to the problem. So for sort name and Abbreviated name as you can see above we have to print the first letter of your first name(in my case that is Ghanendra), and first letter of middle name(in my case that is Pratap Singh) and print the full last name(that is Yadav in my case).
Note:- Most people don't have a middle name so for them print the only first letter of the first name and last name Ie. The name is Ghanendra Yadav then sort name or Abbreviated name will be G. Yadav.
Output:
Enter your Fisrt name: Ghanendra
Enter middle Name: Pratap
Enter your last name: Yadav
Abbreviated Name: G.P.Yadav
need an explanation for this answer? contact us directly to get an explanation for this answer