Your textbook is wrong! Writing such code is pointless, and a waste of your time typing it and the computers time running it.
As others have said, the compiler guarantees that variables outside of methods (class/instance variables) are given a value of 0, false, or null. As you probably know the compiler does not give variables inside of methods values, and instead forces you to give them a value before they are used.
You will find, if you do things "right" that about 90%-95% of your "variables" never change after they are given a value. However, new programmers tend to do things like this:
int x = 0;
// some code that never uses x
x = 5;
// more code that only reads x and never modifies it.
this prevents you from being able to mark x as "final". If you are able to mark x as "final" then it prevents accidental modification of the value, which prevents bugs.
I would write the code like:
final int x;
// some code that never uses x
x = 5;
// more code that only reads x and never modifies it.
This is called a blank final (a final variable that doesn't have a value when it is declared).
If you remember that class/instance variables are initialized by the runtime then you will, hopefully, not write code to initialize them with throw away values, and then you can mark them as final.
My personal practice is to always mark everything as final until I find that I need to modify it, and to never initialize a variable until I know the actual value I want it to have. Doing this make the code faster (not noticeable since assignments are generally very quick) and safer since I rarely accidentally modify a value when I should not.
Arrays.fill(myArr, 0). But it's still a ridiculous suggestion, really if it's a question of clarity put a damned comment in, don't do needless work.