检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]四川大学软件学院,成都610207 [2]琼州大学电子信息工程学院,海南三亚572022
出 处:《电脑开发与应用》2012年第3期63-65,68,共4页Computer Development & Applications
基 金:三亚市院校专项资金项目资助课题(YD09069)
摘 要:2004年2月,Sun公司(2010年10月已被Oracle收购)在它发布的J2SE1.5版中加入了泛型,允许对类型进行抽象,程序员只需声明一个接受可变数目参数的方法,便可得到强类型在编译时刻进行类型检查的好处,简化了程序的开发。阐述了泛型基本概念和作用,介绍了在Java类、接口和方法中使用泛型的方法,通过实例比较使用泛型和不使用泛型的区别,最后指出使用泛型时要注意的问题。In February 2004,Sun released Java 2 SDK,Standard Edition Version 1.5.0 Beta 1,added generic versions allowing Abstract over types.Programmers simply define a method that accepts a variable number of arguments,then they can get benefits of type checking which simplifies program development.This article describes the basic concepts and the role of Java generics,introduces how to make use of Java generics in Java classes,Java interfaces,and Java methods,tells the difference between using Java generics programming and not using by examples.At the last,some problems which need pay attention to in the use of Java generics are summarized.
分 类 号:TP31[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.151