![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
《疯狂JAVA》课后项目总结
LJ文
这个作者很懒,什么都没留下…
展开
-
五子棋总结
1、五子棋需要三个类: Chessman,Chessboard,GobangGame2、准备知识 1>其中Chessman使用的是枚举类 enum 枚举类跟class,interface是等级一样的。适用于一个类的对象有限而且固定,比如季节类只有春夏秋冬四个对象。 用法:所有实例必须在枚举类的第一行显示列出,否则这个枚举类永远都不能产生实例,列出的实例自动添加public stati原创 2016-03-30 22:02:01 · 608 阅读 · 0 评论 -
getActionCommand()用法
1.getSource()Returns:The object on which the Event initially occurred.依赖于事件对象getActionCommand()Returns the command name of the action event fired by this button. If the command name转载 2016-04-06 20:49:28 · 21757 阅读 · 0 评论 -
计算器
1.getActionCommand()用法:标志此事件命令的字符串,如果是运用在按钮上的话,就是获取按钮上的text 2.Arrays.binarySearch(arr[],object)二分查找法,查找之前必须先用Arrays.sort()先排序。查找object是否在数组里面,有的话就返回该object的下标。否则,返回-1 3.String.indexOf(subString):返回子字原创 2016-04-10 19:12:10 · 317 阅读 · 0 评论