📜  颤振从名称中获取首字母 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:09.989000             🧑  作者: Mango

代码示例1
String x = "Stephen Ricard";
String[] nameparts = x.split(" ");
String initials = nameparts[0].charAt(0).toUpperCase()+nameparts[1].charAt(0).toUpperCase(); //Output: SR