If a class has 3 methods, set a breakpoint in front of the 3 methods, a total of 3 breakpoints, and then enter Debug debugging,
Always press F6 (step over) he will go directly into the method and not need you to press F5 (step Into)
Or you just set a breakpoint in the first method, then you need to press F5 (Step into) to enter the method when debugging.
Package args parameter problem;/* * Study questions 1: Look at the program to write the results, and then analyze why it looks like this. and draw the explanation. Finally, we summarize the rules of parameter passing in Java. * Parameter passing problem in Java: Basic type: The change of formal parameters has no effect on the actual parameters. Reference type: Changes in formal parameters directly affect the actual parameters. */public class Argsdemo {public static void main (string[] args) {int a = 10;int B = 20; System.out.println ("A:" +a+ ", B:" +b); A:10,b:20change (A, b); System.out.println ("A:" +a+ ", B:" +b); //??? A:10,b:20int[] arr = {1,2,3,4,5}; Change (arr); System.out.println (arr[1]); //??? 4}public static void change (int a,int b) {//a=10,b=20system.out.println ("A:" +a+ ", B:" +b); a:10,b:20a = b;//a=20b = a + b; B=40system.out.println ("A:" +a+ ", B:" +b); a:20,b:40}public static void Change (int[] arr) {//arr={1,2,3,4,5};for (int x=0; x<arr.length; x + +) {if (arr[x]%2==0) {arr[x]*=2;}} arr={1,4,3,8,5};}}
Java Debugging Small example (how to use F5 and F6)