0
 class BTNode
 {    
     BTNode left, right;
     int data;

     //constructors and methods
} 

In this piece of code no specific modifier is used. What happens then in context of modifier? are their any default behavior?

Ram
  • 2,972
  • 10
  • 38
  • 56
Zahid Hossain
  • 292
  • 1
  • 3
  • 12

1 Answers1

1

From the Java docs:

If a class has no modifier (the default, also known as package-private), it is visible only within its own package (packages are named groups of related classes)

You can read about it here

SatyaTNV
  • 4,053
  • 3
  • 13
  • 30
Yonatan Nir
  • 8,303
  • 23
  • 80
  • 156