摘要:
首先看看代码加结果 package com.tc.test; public class Father { private int i = test(); private static int j = method(); static { System.out.println("父类-静态块 = 1" 阅读全文
摘要:
String在进行字符串拼接时,会把值存在常量池中,这时候地址就会发生改变 String底层维护了一个char[]类型的数组,所以可以通过反射去暴力修改里面的值 public class lovertc{ public static void main(String[] args) throws N 阅读全文
摘要:
首先定义一个时间转换器的类DateAdvice,在springmvc中DateFormat不能是数组,所以就重写CustomDateEditor类并且命名为 MyCustomDateEditor类 @ControllerAdvice public class DateAdvice { @InitBi 阅读全文