Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

What is the difference between a public and a non-public
class?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is java so popular?

212


Is arraylist sorted in java?

191


What is rule of accessibility in java?

160


How do you compare two objects?

175


When should a function throw an exception?

243






Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1113


What is lossy conversion in java?

181


What is the default value of an object reference declared as an instance variable?

215


What is thread pool in java with example?

188


Is integer passed by reference in java?

186


Do extraneous variables affect validity?

172


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

185


Where is const variable stored?

164


How does compareto work in java?

163


What is port number in java?

181