比如这样:
nt
a = 5;
int
b = 10;
int
compareTo = Integer.valueOf(a).compareTo(Integer.valueOf(b));
或者
File file = new
File(getClass().getResource("/test.txt").getFile());
BufferedReader reader;
String text = "";
try
{
reader = new
BufferedReader(new
FileReader(file));
String line = null;
while
(true) {
line = reader.readLine();
if
(line == null) {
break;
}
text += line.trim() + "\n";
}
reader.close();
reader = null;
} catch
(FileNotFoundException e1) {
e1.printStackTrace();
} catch
(IOException e) {
e.printStackTrace();
}
都说编写代码是 30%,维护是 70%,现在这样一个代码维护起来真的让人很头疼,特此求助 V 友支招