test for us package cn.yc.hz 写了一大堆作业来摆着,第一次诺曼底登录 NICE! public class H1 { public static void main(String[] args) { String z1 = "Youaremylover"; String z2 = new String("are"); String z3 = new String("X"); String z4 = " xzslknu zxcbu "; // System.out.println(z1.equalsIgnoreCase(z2)); // System.out.println(z1.compareTo(z2)); // System.out.println(z2.compareToIgnoreCase(z1)); // System.out.println(z1.startsWith(z2)); // System.out.println(z1.startsWith(z2, 1)); // System.out.println(z1.endsWith(z2)); // System.out.println(z1.indexOf("o")); // System.out.println(z1.lastIndexOf(z2,0)); //System.out.println(z2.charAt(2)); //System.out.println(z1.substring(6)); //System.out.println(z2.substring(2, 9)); //System.out.println(z2.concat(z1)); //System.out.println(z2.replace("e", "F")); System.out.println(z1.replaceAll(z2, z3)); System.out.println(z4.trim()); System.out.println(z4.toUpperCase()); System.out.println(z1.toLowerCase()); System.out.println(z1.getBytes()); System.out.println(z4.toCharArray()); }
}