8???????Java???淶????
???????????? ???????[ 2012/9/26 11:02:11 ] ????????
???????????????????????е?Java???????????????????????????????Щ???????????淶???????????????????????????б????????????????????????????????????????????????
????????б?????????????????Щ??????????鶴????? CheckStyle?? FindBugs ?? PMD??
??????Eclipse?и?????????????import???
????Eclipse?????????????????????import?????????????δ????????????????????????????????Щ?????
????Ctrl + Shift + F – ??????????
????Ctrl + Shift + O – ????import??????δ???????
??????????????????????????????????Eclipse?????????????????????????????????import???????????????Eclipse?У??? Window -> Preferences -> Java -> Editor -> Save Actions?????? Perform the selected actions on save????? Format source code?? organize imports??
??????????????г?????return??????????
?????????????У?????????? ????????????????????????????return???
?????磬?????????? ??????????????ж???????return?????
private boolean isEligible(int age){
if(age > 18){
return true;
}else{
return false;
}
}
??????????????????д??????????????????????????????????
private boolean isEligible(int age){
boolean result;
if(age > 18){
result = true;
}else{
result = false;
}
return result;
}
??????if-else??????
????????д???Щ???????????????????????Щ?????????????????????????磬??????????? isEligible??????
private boolean isEligible(int age){
boolean result;
if(age > 18){
result = true;
}else{
result = false;
}
return result;
}
???????????????return???????д???????
private boolean isEligible(int age){
return age > 18;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11