描述
JAVA29 动态字符串:动态字符串_牛客题霸_牛客网 (nowcoder.com)
将一个由英文字母组成的字符串转换成从末尾开始每三个字母用逗号分隔的形式。
输入描述:
一个字符串
输出描述:
修改后的字符串
示例1
输入:
hellonowcoder输出:
h,ell,ono,wco,derpublic class Main { public static void main(String[] args) { Singleton s1 = Singleton.getInstance(); Singleton s2 = Singleton.getInstance(); System.out.println(s1 == s2); } } class Singleton { private static Singleton instance; private Singleton() { } public static Singleton getInstance(){ if(instance==null){ instance=new Singleton(); } return instance; } //write your code here...... }
JAVA29 动态字符串
最新推荐文章于 2022-09-14 08:02:22 发布