摘要:
记录一下今天,本以为最稳的实习竟然是最不稳的,以至于错过了去360实习的机会,而且还自信满满的对360hr说不去了,真是可悲又可笑。同样的事在一个人身上跌倒了不知多少次,果然不能太信任一个人,好了伤疤忘了疼,总看见别人给画的大饼,却没看到饼后的刀子。最后竹篮打水一场空,另外这样孤注一掷真的不行啊。但 阅读全文
摘要:
https://www.cnblogs.com/lukelook/p/11183155.html 先看一个例子: //class A package com.my.test; class A { static { System.out.println("A1:父类静态代码区域"); } { Syst 阅读全文
摘要:
@Autowired 应用场景:父类或抽象类中存在公共依赖的bean时 工作原理1.注解解析器:AutowiredAnnotationBeanPostProcessor 2.Spring容器启动时,AutowiredAnnotationBeanPostProcessor被注册到容器; 3.扫描代码, 阅读全文
摘要:
最近从C++转JAVA很多不适应的地方 List的拷贝就是其中之一 //假如申请一个ListList<Integer> temp = new ArrayList<>();//另申请一个直接相等, List<Integer> t1 = temp;temp.add(1); t1.forEach(Syst 阅读全文
摘要:
使用的idea版本是2019.2.1,以及MAVEN版本是3.6.3。 同步一直出现问题,查看日志后报错 java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see t 阅读全文
摘要:
Comparator接口 public interface Comparators <T> { int compare(T first, T second); } //要按长度比较字符串,可以如下定义一个实现 Comparator<String> 的类: class LengthComparator 阅读全文
摘要:
ArrayList<E>( ) 构造一个空数组列表。 ArrayList<E>( int initialCapacity) 用指定容量构造一个空数组列表。 参数:initalCapacity 数组列表的最初容量 boolean add( E obj ) 在数组列表的尾端添加一个元素。永远返回 tru 阅读全文
摘要:
java.math包中有两个很有用的类:BigInteger(整数)和BigDecimal(浮点数),这两个类可以处理包含任意长度数字序列的值。 声明:BigInteger a = BigInteger.valueOf(100); 一些API: BigInteger add(BigInteger o 阅读全文
摘要:
JAVA中的输入比较麻烦(相对C++) 首先需要创建一个Scanner对象,并与标准输入流System.in关联 Scanner in = new Scanner(System.in); Scanner类定义在JAVA.UTIL包中, Scanner的一些方法: Scanner in = new S 阅读全文
摘要:
java中String感觉不如C++方便,最近在看JAVA核心技术,说是因为在JAVA文档中将String对象成为不可变字符串。如果修改只能让它引用另一个字符串,这样的好处是编译器可以让字符串共享。 String的一些方法: char charAt(int index),返回给定范围的代码单元。 i 阅读全文