Originally posted by Manfred Leonhardt:
Hi,
I will try and walk you through your examples:
no = 1;
ans = ++no + 2*++no;
Compiler does:
ans = (++no) + 2 * (++no)
ans = (1+1) + 2 * (++no) // no = 2 after this
ans = 2 + 2 * (++no)
ans = 2 + 2 * (2+1) // no = 3 after this
ans = 2 + 2 * 3
ans = 2 + 6
ans = 8
Originally posted by Zahid, Butt:
" A class in which all the members are declared private cannot be declared public. "
Can someone elaborate on this PLEASE ??? Maybe some code examples ??
Thanks in advance.