|
@@ -0,0 +1,76 @@
|
|
|
+package com.sf;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.Locale;
|
|
|
+
|
|
|
+public class User implements Cloneable{
|
|
|
+ public static void main(String[] args) throws CloneNotSupportedException {
|
|
|
+// User user = new User();
|
|
|
+// System.out.println(user);
|
|
|
+// Object clone = user.clone();
|
|
|
+// User user1= null;
|
|
|
+// if(clone instanceof User){
|
|
|
+// user1 = (User) clone;
|
|
|
+// System.out.println(user1);
|
|
|
+// }
|
|
|
+// if(user.equals(user1)){
|
|
|
+// System.out.println("===========");
|
|
|
+// }else {
|
|
|
+// System.out.println("------------");
|
|
|
+// }
|
|
|
+// System.out.println(user.getClass());
|
|
|
+// System.out.println(user.hashCode());
|
|
|
+// System.out.println(user1.hashCode());
|
|
|
+
|
|
|
+// int a = 1;
|
|
|
+// int b = 2;
|
|
|
+// if(a != b){
|
|
|
+// System.out.println("---------");
|
|
|
+// }
|
|
|
+// Date date = new Date();
|
|
|
+// System.out.println(date);
|
|
|
+// System.out.println(date.toString());
|
|
|
+//
|
|
|
+// String s1 = "javaEE";
|
|
|
+// String s2 = "javaEE";
|
|
|
+// String s3 = new String("javaEE");
|
|
|
+// String s4 = new String("javaEE");
|
|
|
+//
|
|
|
+// System.out.println(s1 == s2);
|
|
|
+// System.out.println(s1 == s3);
|
|
|
+// System.out.println(s1 == s4);
|
|
|
+// System.out.println(s3 == s4);
|
|
|
+// String str = "abc";
|
|
|
+// if(str.isEmpty()){
|
|
|
+// System.out.println("=========");
|
|
|
+// }
|
|
|
+// System.out.println(str.length());
|
|
|
+// String str1 = str.concat("d");
|
|
|
+// System.out.println(str1);
|
|
|
+ ;
|
|
|
+
|
|
|
+// String str1 = str + "d";
|
|
|
+// System.out.println(str1);
|
|
|
+
|
|
|
+// String str = "abc";
|
|
|
+// String str1 = "ABC";
|
|
|
+// if(str.equalsIgnoreCase(str1)){
|
|
|
+// System.out.println("=======");
|
|
|
+// }
|
|
|
+ int www = "WWW".compareToIgnoreCase("qq");
|
|
|
+ System.out.println(www);
|
|
|
+ String str2 = " AAAjhkhcbHGHi ugBHbouygBOHObhoGO";
|
|
|
+ String s = str2.toLowerCase();
|
|
|
+ System.out.println(s);
|
|
|
+ System.out.println(s.toUpperCase());
|
|
|
+ String trim = str2.trim();
|
|
|
+ System.out.println(trim);
|
|
|
+ String replace = str2.replace(" ", "***");
|
|
|
+ System.out.println(replace);
|
|
|
+ StringBuffer stringBuffer = new StringBuffer();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|