package defaultPackage;
class Logger {
void message(){
System.out.println("This is a message");
}
}
class Data {
// private variable
private String name;
}
public class Main {
public static void main(String[] main){
// create an object of Data
Data d = new Data();
// access private variable and field from another class
d.name = "Programiz";
}
}
// Java program to illustrate default modifier
package one;
// Class first is having Default access modifier
class First
{
void display()
{
System.out.println("Welcome to softhunt.net");
}
}