摘要: public class Demo { public static void main(String[] args) { Set set = new HashSet();//定义set集合 set.add("haha");//向set中添加数据 set.add("hehe"); set.add("h 阅读全文
posted @ 2018-08-21 20:15 Captain灬 阅读(207) 评论(0) 推荐(0) 编辑
摘要: //参数传递:1.如果参数是基本数据类型,方法中参数的值改了,方法外参数还是原来的参数// 2.如果参数是数组,方法中参数的值改了,方法外的参数值也改了 public class Demo { static int a = 10;//基本数据类型 static int [ ] b = {10};// 阅读全文
posted @ 2018-08-21 19:36 Captain灬 阅读(113) 评论(0) 推荐(0) 编辑