From the stack overflow question here, If we have a code like this,
public class testprog {
static void f (int x) {
System.out.println ("num is " + (x+0)); // <- step into
}
static void g (int x) {
-> f(x); // <----------------------------------- current location
f(1); // <----------------------------------- step over
}
public static void main (String args[]) {
g(2);
g(3); // <----------------------------------- step out of
}
}
And we are at the line f(x)
in the method g(..)
.
- Step Into - Goes in to the definition of funtion
f(..)
and goes to theprintln
statement inf(..)
- Step Over - Goes to
f(1)
which is the next line stepping over the function call - Step Out - Runs enough code to get you one level up from the current level. In this case it will go to either
g(2)
org(3)
depending on what called thatf(..)
- Step Over - When you do step over, you always go to the next line in the program irrespective of whether the current line is a statment or a call to a function.