// Java program to illustrate
protected modifier
package one;
// Class A
public class A
{
protected void display()
{
System.out.println("Welcome to softhunt.net");
}
}
// Java program to illustrate
public modifier
package one;
public class A
{
public void display()
{
System.out.println("Welcome to softhunt.net");
}
}
package two;
import one.*;
class B {
public static void main(String args[])
{
A obj = new A();
obj.display();
}
}