随笔分类 -  [08]JDK 新特性

摘要:在操作之前就先下Apache官网上下载相就的工具,这里我们要下载commons-beanutils 和commons-logging,我下载的版本是commons-beanutils-1.8.3和commons-logging-1.1.1,然后我选择的是commons-beanutils-1.8.3.jar和commons-logging-1.1.1.jar这两个jar包演示用Eclipse如何加入jar包,先只是引入beanutils包,等程序运行出错后再引入logging包在前面的内省例子的基础上,用BeanUtils类先get原来设置好的属性,再将其set为一个新值。get属性时返回的结 阅读全文
posted @ 2013-05-20 00:32 乖乖爽 阅读(1288) 评论(0) 推荐(0)
摘要:1,相比JDK 1.4 以前,JDK1.5 有:a.了静态导入特性package com.ws.jdk;//import static java.lang.Math.random;import static java.lang.Math.*;public class A { public static void main (String [] args){ System.out.println(random()); System.out.println(max(3,5));//较大值 System.out.println(abs(3-5));//求绝对值 } ... 阅读全文
posted @ 2013-05-17 15:28 乖乖爽 阅读(146) 评论(0) 推荐(0)