关于java的泛型
时间:2007-12-30 来源:coldwinter011
从list对象中向外取对象:
1,List<Object> list=new ArrayList<Object>();
Object o=list.get(i);
2,,Iterator<Object> it = list.iterator();
while(it.hasNext())
{
Object o=it.next();
..............................
}
可是mvn?1.3?5?
在pom.xml中加入
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
就可以了
1,List<Object> list=new ArrayList<Object>();
Object o=list.get(i);
2,,Iterator<Object> it = list.iterator();
while(it.hasNext())
{
Object o=it.next();
..............................
}
可是mvn?1.3?5?
在pom.xml中加入
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
就可以了
相关阅读 更多 +