+ 1

Like using friend keyword we access private members in c++ ,how can we access private members in other language??

19th Jul 2017, 5:01 AM
sagar
sagar - avatar
3 ответов
+ 1
I do not know for java :/
22nd Jul 2017, 5:48 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
0
There is no private member in python You can try to do a class method taking an object of the class as its first parameter, it could work. If not, you'll need getter/setter
19th Jul 2017, 5:58 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
0
in java??
22nd Jul 2017, 4:15 AM
sagar
sagar - avatar