Do I need to create an instance again by calling newInstance() method on X class?
No, given your explanations, you already have an object X. You don't need to create a new one of whatever type it is.
To call the methods of Object X, Do i have to call method.invoke() each and every time ? Assume X object has 5 methods, find the method and invoke the method using Method.invoke.
Reflection is a run time thing. You don't know the declared (or static) types to work with. You're basically only working with the Object
interface/contract. As such, you need to do everything through the reflection utilities. If you want to call a method of an object, you need to retrieve the corresponding Method
object and call its invoke(..)
method with the correct arguments.