随笔分类 - JAVA
摘要:1. next() VS nextLine() 1.1 对比 组1 组2 next()/nextDouble()/nextFloat() /nextInt()/nextLine() nextLine () 只返回非空字符,且不接收一切空字符 接收Enter键之前的所有字符, 即可以得到带blank或
阅读全文
摘要:问题描述: 1. assertThat()红色报警 2. is()红色报警 问题解决: 1. 导入 import static org.hamcrest.MatcherAssert.assertThat; 注意: 不要导入org.junit.Assert.assertThat, 因为这个包里的ass
阅读全文
摘要:先说颜色: 绿色:public 黄色:protected 蓝色:no modifier 红色:private 再说形状: 实心:method 空心:variable 实心中间有字母C:class Class右侧有向右的箭头:运行入口 再说字母: S:static F:final 常用组合: 绿圆圈:
阅读全文
摘要:1、ArrarList 转 string[] : ArrayList list = new ArrayList(); list.add("aaa"); list.add("bbb"); String[] arrString = (String[])list.toArray(new String[li
阅读全文
摘要:String转char[],简单。但String如何转为Character[]? 方式一:推荐,无需import 1 String str = "testString"; 2 Character[] charObjectArray = str.chars().mapToObj(c -> (char)
阅读全文
摘要:诉求:将idea中的java代码放入eclipse中,但是本人不会导入。。。 解决: 1.对照IDEA的文件目录,在eclipse中手动新建Project,假设名称为day01, day02.... 2.在windows资源管理器中,打开eclipse存放java文件的workspace,在其中依次
阅读全文

浙公网安备 33010602011771号