Okay, first things first. Uninitialized class-level primitive variables are always initialized to their default values. ie., 0 for int, 0.0 for double, false for boolean and so on. So, if you were to comment out giveMeJ() method call, you will get zero. i is uninitialized, so gets it default value 0.
Now about your question. Remember that declaration and initialization and are done in the order they appear in the code. In your code, giveMeJ() method is trying to
access integer j before it is initialized. So, when the giveMeJ() method is getting executed,
value of j is its default value which is zero.. If you swap the declaration of i and j in your code, it prints 10. I hope now you know why it prints 10.
The interesting thing is, if you replace the call to giveMeJ() with j, compiler gives you an error saying
Can't make forward reference to j. But for some reason best known to authors of
Java, they thought situations like your code is valid.
Hope this helps,
Ajith