A.數(shù)據(jù)庫、IO操作等需要使用結(jié)束close()的對(duì)象必須在try-catch-finally的finally中close() B.數(shù)組聲明的時(shí)候使用int[]index,而不要使用intindex[] C.所有的類必須重載toString()方法,返回該類有意義的內(nèi)容 D.自己拋出的異常必須要填寫詳細(xì)的描述信息
A.除了構(gòu)建器外,不要使用和類名相同的方法名 B.使用equals()比較兩個(gè)類的值是否相同 C.不要使用嵌套賦值,即在一個(gè)表達(dá)式中使用多個(gè)= D.重載equals()方法時(shí),不必要重載hashCode()方法
A.int fun(int a, float b) { } float fun(int a, float b) { } B.float fun(int a, float b) { } float fun(int x, float y) { } C.float fun(float a) { } float fun(float a, float b) { } D.float fun1(int a, float b) { } float fun2(int a, float b) { }