You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Unused_Method.java 323 B

3 years ago
12345678910111213141516171819202122
  1. package Unused_Method;
  2. public class Unused_Method
  3. {
  4. private String bad() // bad 未使用的方法
  5. {
  6. return "Calculation";
  7. }
  8. /* FIX: good() method calls calculation() */
  9. private String calculation() // good 未使用的方法
  10. {
  11. return "Calculation";
  12. }
  13. public void good()
  14. {
  15. calculation();
  16. }
  17. }

No Description

Contributors (1)