Today will write a program to the short name by java program, this problem is also asking in many ways they are following:
1. Java Program to Convert a Person Name in Abbreviated.
2. wap to print the short name of the user.
3. Java program to convert full name to short name.
4. Java program to a short name.
5. Abbreviation of Java programming language.
Enter Name: Anant Deep Vishwakarma
Output: A. D. Vishwakarma
1. Store Name in a name String.
2. Split Name String and Store to a temp string array.
3. Find temp string array length store value in other variables.
4. Take a loop to store all value to expect the last name and print the first character by value with
dot or abbreviation.
5. then print the last value of temp string all Character
For example a store name ‘Anant Deep Vishwakarma’in a name string and then split value into temp string array as temp=’Anant’, temp=’Deep’ and temp=’Vishwakarma’, after that count length of temp string array and use loop to left the last index value last name ‘Vishwakarma’, in loop print first char of every index value within loop. in the last print last index of program
Best java program example:
public static void main(String args)
Scanner c=new Scanner(System.in);
System.out.print(“Enter the user name:”);
String  t=n.split(” “);
System.out.print(“Your Short name:”);
I hope you understand the program is any query please comment below your query I reply your questions soon.