代码:
public class Test { public static void main(String args[]) { String string = args[0]; System.out.println("last character: " + string.substring(string.length() - 1)); }}
java Test abcdef:
last character: f
欢迎分享,转载请注明来源:内存溢出
代码:
public class Test { public static void main(String args[]) { String string = args[0]; System.out.println("last character: " + string.substring(string.length() - 1)); }}
java Test abcdef:
last character: f
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)