摘要: public class PokerDemo { public static void main(String[] args) { //创建一个牌盒,也就是定义一个集合对象,用ArrayList集合实现 ArrayList<String> array = new ArrayList<String>( 阅读全文
posted @ 2020-04-13 15:39 硬盘红了 阅读(162) 评论(0) 推荐(0) 编辑
摘要: public class CollectionsDemo { public static void main(String[] args) { //创建集合对象 ArrayList<Student> arrayList = new ArrayList<Student>(); //创建学生对象 Stu 阅读全文
posted @ 2020-04-13 12:39 硬盘红了 阅读(584) 评论(0) 推荐(0) 编辑
摘要: public class CollectionsDemo { public static void main(String[] args) { //创建集合对象 List<Integer> list = new ArrayList<Integer>(); //添加元素 list.add(50); l 阅读全文
posted @ 2020-04-13 11:20 硬盘红了 阅读(174) 评论(0) 推荐(0) 编辑
摘要: public class HashMapDemo { public static void main(String[] args) { //键盘录入一个字符串 Scanner sc = new Scanner(System.in); System.out.println("请输入一个字符串:"); 阅读全文
posted @ 2020-04-13 10:25 硬盘红了 阅读(508) 评论(0) 推荐(0) 编辑