Do we have to create object of Abc abc=new Abc() as class variable and then set the value as above or this object should be created inside the method and then value is set?
I'd say the way you're doing it now is right, but it really depends on your requirements.
If the value is meant to be part of the state of the object at creation, you can set it in your constructor. But if it is likely to change (or is meant to be changed), the setter / getter you're using now seems right.
Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.