sentence: some languages like smalltalk and ruby only allow access via object methods , but most others ( e.g. c++ , c# or java ) offer the programmer a degree of control over what is hidden , typically via keywords like public and private .