Connect Same Package Classes in Java ApplicationĀ  | Java Online Training

This Java Online Training”Connect Same Package Classes in Java” page providing clearly how to access one class members from another class of same package in java application.


 

Connect Same Package Classes :

  • Default access modifier in Java is “package”
  • Default access permissions in Java application is package level.
  • Hence we can access one class members from another class of same package directly.

 

Run above Program gives Runtime error:

 

 

Run Second.java File :

Share this