0

I use eclipse to develop java program. About the below code segment:

public class Boot {
    public static void main(String[] args){
        int[] arr = {1,24,2,12};
        Arrays.sort(arr);////////make breakpoint!!!!!!!!!!!!
        System.out.println(arr);
    }
}

I make a breakpoint at Arrays.sort(arr); And when I debug this code segment, the thread will be suspended at this breakpoint, then I move the mouse on (arr) it will display {1,24,2,12} as this.
Then I step into this method Arrays.sort(arr) and of course I come into the sort method of Arrays .

Then my question come, I move the mouse on int[] a (the parameter of this method) it dont display the content of a which should be {1,24,2,12} this is the info it display


my question is that whether there exist a way I can see the content of a {1,24,2,12}
or that is to say whether there exist a way by which we can see the value of variable belong to import class.

liushui
  • 27
  • 4

1 Answers1

0

Use the Variables view in eclipse debugger mode.

And here's an explanation of why you're not able to see the values on mouse over: https://stackoverflow.com/a/271543/2061329

Community
  • 1
  • 1
Sourabh
  • 429
  • 1
  • 4
  • 11