Java计算数字字符 Java反转给定字符串 Java打开纯文本文件 Java计算数字字符 public class Sample { public static void main(String args[]) { String str = new String("Hi welcome to codingdict"); int count =0; for(int i=0; i<str.length(); i++) { count++; } System.out.println("Number characters in the given string (including spaces) "+count); } } Java反转给定字符串 Java打开纯文本文件