摘要: 垃圾回收是Java中自动内存管理的另一种叫法。垃圾回收的目的是为程序保持尽可能多的可用堆(heap)。 JVM会删除堆上不再需要从堆引用的对象。 比方说,下面这个方法就会从函数调用。 通过函数第一行代码中参考变量calendar,在堆上创建了GregorianCalendar类的一个对象。 函数结束 阅读全文
posted @ 2018-01-22 17:25 路迢迢 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 断言是在Java 1.4中引入的。它能让你验证假设。如果断言失败(即返回false),就会抛出AssertionError(如果启用断言)。基本断言如下所示。 基本语法: 开启断言:虚拟机参数 -ea 阅读全文
posted @ 2018-01-22 17:19 路迢迢 阅读(135) 评论(0) 推荐(0) 编辑
摘要: //int(type) followed ... (three dot's) is syntax of a variable argument. public static int sum(int... numbers) { //inside the method a variable argument is similar to an array. ... 阅读全文
posted @ 2018-01-22 17:12 路迢迢 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 官网: spring boot springcloud 学习资源 使用IDEA创建SpringBoot项目 Spring Boot教程 https://blog.csdn.net/forezp/article/details/70341818 Spring Cloud教程 http://blog.c 阅读全文
posted @ 2018-01-22 10:50 路迢迢 阅读(209) 评论(0) 推荐(0) 编辑