What is the difference between a public and a non-public
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|
What do you mean by composition in java?
what is meant by Byte code concept in Java?
Can an interface extend another interface?
Can we extend singleton class in java?
You're given a Boolean 2D matrix, can you find the number of islands?
What is basic concept of static in java ?
What is the purpose of file class?
Explain abstract class in java?
Can we have static methods in an interface?
Are the equals() and hashCode() protected methods of object class?
Can singleton class be cloned?
how to make the double-tone class ? as we have singletone class..?