Simple. Use a class. (just like C++). Use specifiers like private and public to distinguish beween data to be hidden and revealed.

(Correct me if I am wrong. I am a novice in Java)

Cheers!
Kalayama