11 2022 档案
摘要:public class StringTest { public static void main(String[] args) { String s1 = new String("abc");//构造器实例化,声明在堆 String s2 = new String("abc"); String s
阅读全文
摘要:public class Singleton1 {//饿汉式 private Singleton1(){}; static Singleton1 singleton1 = new Singleton1(); public static Singleton1 getSingleton1(){ retu
阅读全文
摘要:public int[] sortMaopao(int[] arry){ for (int i = 0; i <arry.length ; i++) { for (int j = 0; j < arry.length-1-i; j++) { if (arry[j]>arry[j+1]) {//从小到
阅读全文

浙公网安备 33010602011771号