package top.qaqaq.java.P269;
/*
* 如何调试程序:
* 1. System.out.println().
* 2. Eclipse - Debug调试
*
*/
public class DebugTest {
public static void main(String[] args) {
int i = 10;
int j = 20;
System.out.println("i = " + i + ", j = " + j);
DebugTest test = new DebugTest();
int max = test.getMax(i, j);
System.out.println("max = " + max);
}
private int getMax(int k, int m) {
int max = 0;
if (k < m) {
max = k;
} else {
max = m;
}
return max;
}
}
package top.qaqaq.java.P269;
public class DebugTest1 {
public static void main(String[] args) {
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
}
}