Genesys Interview Question

how is encapsulation implemented in java?