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
  • 3,092
  • 10
  • 40
  • 56
Zahid Hossain
  • 292
  • 1
  • 3
  • 13

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,137
  • 3
  • 15
  • 31
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203