1)表:table(FId,Fclass,Fscore),用SQL列出各班成绩最高的列表,显示班级,成绩两个字段。
2)请实现单例模式。
1 public class Singleton{ 2 /* 懒汉式 */ 3 private static Singleton instance = new Singleton(); 4 5 private Singleton(){} 6 7 public static Singleton getInstance(){ 8 return instance; 9 } 10 } 11 12 public class Singleton{ 13 /* 饿汉式 */ 14 private static Singleton instance = null; 15 16 private Singleton(){} 17 18 public static Singleton getInstance(){ 19 if(instance == null) 20 instance = new Singleton(); 21 return instance; 22 } 23 }
原文:https://www.cnblogs.com/sketeton/p/11760637.html