// Java program to illustrate protected modifier package one; // Class A public class A { protected void display() { System.out.println("Welcome to softhunt.net"); } }