Computer Science, asked by anildelta, 1 year ago

can we create object of static class?

Answers

Answered by srinitishsri
1

well for starters...ur class can not be defined using a modifier...

yes,a static function is called using an object of a class....




srinitishsri: obj.add();
srinitishsri: obj.sub();
anildelta: then we dont need to create it's object ..we can call it by its class name. like Australia.add() and Australia.sub()
srinitishsri: ye u can do that as well.....
anildelta: is it possible?
srinitishsri: however....create an object...thats what u do in the boards....coz is mentioned in the question
srinitishsri: it would be
anildelta: ok will try practically also but i m not sure about
anildelta: because i also searched on the Google but all the people are saying that can't create object of it as its made for using its members by its name only
anildelta: thanks for your comments
Similar questions