, 나는 종종이를 참조하십시오실제 클래스보다 인터페이스를 선언하고 싶습니다. 예를 들어
Set<Integer> s = new TreeSet<Integer>();
Set<Integer> s = new HashSet<Integer>();
Map<Integer, String> m = new HashMap<Integer, String>();
TreeSet<Integer> ts = new TreeSet<Integer>();
HashSet<Integer> hs = new HashSet<Integer>();
HashMap<Integer, String> hm = new HashMap<Integer, String>();
을 통해 무엇 장점/후자 대 전자의 disadvanges?
http://stackoverflow.com/questions/2026054/why-do-we-use-interface-is-it-only-for-standardization – Jayan
사실, 이것은 훨씬 더 유사합니다 : http://stackoverflow.com/z/1484445/why-are-variables-with-the-interface-name-in-java? rq = 1 – Zong
@ Zong Li : 네, 실제로 이것은 중복되었습니다. – Jayan