在IDEA中使用工具(Code->Reformate Code)把下面代码重新格式化,再研究一下Code菜单,找出一项让自己感觉最好用的功能。提交截图,加上自己学号水印。

public class CodeStandard {
public static void main(String [] args){
StringBuffer buffer = new StringBuffer();
buffer.append('S');
buffer.append("tringBuffer");
System.out.println(buffer.charAt(1));
System.out.println(buffer.capacity());
System.out.println(buffer.indexOf("tring"));
System.out.println("buffer = " + buffer.toString());
if(buffer.capacity()<20)
buffer.append("1234567");
for(int i=0; i<buffer.length();i++)
System.out.println(buffer.charAt(i));
}
}
这个功能可以在光标所指处添加我想要的功能,或者条件,类似于if,for的都可以添加。
20145202马超 2016-2017-2 《Java程序设计》第三次实验

  • 在码云上把自己的学习搭档加入自己的项目中,确认搭档的项目加入自己后,下载搭档实验二的Complex代码,加入不少于三个JUnit单元测试用例,测试成功后git add .; git commit -m "自己学号 添加内容";git push;

提交搭档项目git log的截图,包含上面git commit的信息,并加上自己的学号水印信息。
20145202马超 2016-2017-2 《Java程序设计》第三次实验

完成重构内容的练习,下载搭档的代码,至少进行三项重构,提交重构后代码的截图,加上自己的学号水印。提交搭档的码云项目链接。
20145202马超 2016-2017-2 《Java程序设计》第三次实验

提交学习成果码云链接和代表性成果截图,要有学号水印

20145202马超 2016-2017-2 《Java程序设计》第三次实验

相关文章:

  • 2021-07-08
  • 2022-01-23
  • 2021-10-29
  • 2022-02-15
  • 2021-06-29
  • 2021-12-16
  • 2021-05-30
  • 2021-06-18
猜你喜欢
  • 2021-10-30
  • 2021-06-30
  • 2021-11-01
  • 2021-08-30
  • 2021-08-07
  • 2021-07-19
  • 2021-06-24
相关资源
相似解决方案