Santosh,
Unfortunatly you have to break this down:
line 2: public void m(Object x) {
This line declares a method that takes an argument which is
an Object reference.
line 3: x = new Integer(99);
Here a new Integer Object is created (the "new Integer(99)"
part), then the Object reference is changed to refer to the
newly created Integer object (the "x = " part).
line 4: Integer y = (Integer)x;
Here the Object Reference x is "cast" to an Integer reference (the "(Integer)x" part, this allows this part to of the line to be treaded like an Integer reference). Next a new Integer reference is created, and it is set to refer to the same object as x (the "Integer y =" part).
Remember, references are like signs pointing toward an city.
You can have as many signs pointing towards Chicago as you want, but if one falls over so it points towards Latvia all the rest still point towards Chicago.(sorry, bad analogy)
I hope this helps,
Jason