資料內(nèi)容:
1、 行斷點(diǎn)
斷點(diǎn)打在代碼所在的行上。執(zhí)行到此行時(shí),會(huì)停下來。
【案例1】
此時(shí)得到的不是想要的結(jié)果:
package com.atguigu.debug;
/**
* ClassName: Debug01
* Package: com.atguigu.debug
* Description: 演示1:行斷點(diǎn) & 測(cè)試debug各個(gè)常見操作按鈕
*/
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;
}
}