摘要: package com.study; public class Study { public static void main(String[] args) { GirFriend girFriend01 = GirFriend.getInstance(); GirFriend girFriend0 阅读全文
posted @ 2021-10-18 21:54 来根蘭州 阅读(29) 评论(0) 推荐(0)
摘要: 1.设计思路 2.创建迷宫 3.策略(下->右->上->左) package study; public class Test02 { public static void main(String[] args) { //定义二维数组 int[][] map = new int[8][7]; //把 阅读全文
posted @ 2021-09-26 16:21 来根蘭州 阅读(78) 评论(0) 推荐(0)
摘要: (1)基本数据类型 首先说明int a = 10;int b = 20;与方法中的参数int a,int b是不冲突的,这两者所处的空间不同 结论: 这里主要讲解的成员方法传递基本数据类型的机制 1.首先main方法会开辟一个栈空间,在main方法中把a = 10;b = 20传递给swap方法中定 阅读全文
posted @ 2021-09-20 11:18 来根蘭州 阅读(91) 评论(0) 推荐(0)
摘要: public class Test02 { public static void main(String[] args) { //1.创建对象 Person p1 = new Person(); //2.调用方法 int returnRes = p1.getSum(10,20); System.ou 阅读全文
posted @ 2021-09-17 15:18 来根蘭州 阅读(70) 评论(0) 推荐(0)
摘要: Person p1 = new Person(); p1.age = 10; p1.name = "小明"; Person p2 = p1; System.out.println(p2.age); //1.先加载Person类信息(只会加载一次) Person p1 = new Person(); 阅读全文
posted @ 2021-09-15 23:43 来根蘭州 阅读(215) 评论(0) 推荐(0)