Sample code to demonstrate different Java protection modes