摘要: 2个对象的内存图 (其中有两个引用指向同一个对象)过程图! 两个对象的内存图(方法的共用) 阅读全文
posted @ 2024-07-30 22:00 将兀伏 阅读(8) 评论(0) 推荐(0)
摘要: /* 数组元素逆序 (就是把元素对调) 涉及数组元素交换的逻辑的时候,可以定义一个中间变量,作用是临时将值存储一下 */ public class ArrayTest3 { public static void main(String[] args) { int[] arr = {1, 2, 3, 阅读全文
posted @ 2024-07-30 20:10 将兀伏 阅读(33) 评论(0) 推荐(0)
摘要: 找出数组中最大和最小值 /* 数组获取最值(获取数组中的最大值最小值) */ public class ArrayTest2 { public static void main(String[] args) { int[] arr = {123, 451, 45, 12, 556, 12, 412} 阅读全文
posted @ 2024-07-30 20:04 将兀伏 阅读(34) 评论(0) 推荐(0)