資料內(nèi)容:
1、 行斷點
斷點打在代碼所在的行上。執(zhí)行到此行時,會停下來。
【案例1】
此時得到的不是想要的結(jié)果:
package com.atguigu.debug;
/**
* ClassName: Debug01
* Package: com.atguigu.debug
* Description: 演示1:行斷點 & 測試debug各個常見操作按鈕
*/
public class Debug01 {
public static void main(String[] args) {
//1.
int m = 10;
int n = 20;
System.out.println("m = " + m + ",n = " + n);
swap(m, n);
System.out.println("m = " + m + ",n = " + n);
//2.
// int[] arr = new int[] {1,2,3,4,5};
// System.out.println(arr);//地址值
// char[] arr1 = new char[] {'a','b','c'};
// System.out.println(arr1);//abc
}
public static void swap(int m,int n){
int temp = m;
m = n;
n = temp;
}
}