0

By default class is ?

private public protected package private which is right answer

26th Aug 2017, 7:13 AM
corejava
2 Answers
+ 4
Java: By default, the classes visibility is package private, i.e. only visible for classes in the same package. C++: The class has no visibility defined like in Java. They are visible if you included them to the compilation unit.
26th Aug 2017, 7:20 AM
GAWEN STEASY
GAWEN STEASY - avatar
0
In java, the default identifier for classes is package private. Source: https://stackoverflow.com/questions/16164902/what-is-the-default-access-modifier-in-java
26th Aug 2017, 7:21 AM
Marco