1.Map<K,V> 声明的泛型类型必须是类,不能是基本类型。如果是基本类型将其写为对应的对象类型。2.Map<k,v>map=newLinkedHashMap<k,v>();当两边都有泛型时,那么这两个泛型就必须相同。容易出错的地方,如:List<Object>list=new ArrayList<String>();不行List<String>list=new ArrayList<Object>();不行3.也可以允许只有一边有泛型,另一边没有泛型。Mapmap=newLinkedHashMap<k, Read More
posted @ 2013-05-12 16:00
javawebsoa
Views(208)
Comments(0)
Diggs(0)
静态代理是一种编译期的代理类,它的.class文件在运行前已经生产,使用静态代理类可以在委托类完成指定调用前对消息进行处理与过滤。简单例子如下:package search;public class HelloServiceProxy { private HelloService helloService; public HelloServiceProxy(HelloService helloService) { this.helloService=helloService; } public String echo(String msg) { System.out.println(" Read More
posted @ 2013-05-12 15:58
javawebsoa
Views(202)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号