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

What is use of super keyword in java?

584


Describe what happens when an object is created in java ?

535


Explain the difference between an object-oriented programming language and object-based programming language?

535


How do you reverse a list?

540


What are different types of states exist for a thread?

536






How do you reverse a string in java?

570


What is empty list in java?

608


Tell us something about set interface.

546


What language is java written?

521


What is compiler and what its output.

624


How we can declare a static variable?

638


What are thread groups?

561


Is a char always 1 byte?

493


What is the purpose of object oriented programming?

521


Can we declare the static variables and methods in an abstract class?

538