What is the difference between a public and a non-public
class?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
public class is the one whose memebers can get an access to
all the classes in the same package and out of the package
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / javachi
public class is a class that can be accessed from anywhere in the package and outside the package, this public means access globaly.
there is no such non-public class in java. so we can consider private, protected, friendly classes as a non-public classes.
| Is This Answer Correct ? | 6 Yes | 1 No |
When arithmeticexception is thrown?
What are methods and how are they defined?
What are identifiers in java?
What are the two types of streams offered by java 8?
What is a numeric literal?
if two references are having same hash codes,is that means those are refering to same object?
what is Thread?
What is the difference between length and length () in java?
Difference between association, composition and aggregation?
What do you mean by synchronized non access modifier?
Explain naming conventions for packages?
What is meant by collection in java?