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

Answers were Sorted based on User's Feedback



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

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

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

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

Post New Answer

More Core Java Interview Questions

What is meant by the value of a variable?

0 Answers  


What is the significance of java packages?

0 Answers  


What is the difference between Resultset and Rowset.

6 Answers   IBM, Wipro,


import java.io.*; class Demo { public static void main(String args[]) { File f=new File("1234.msg"); String arr[]=f.list(); System.out.println(arr.length); } }

3 Answers   IBM, Ramco,


Describe the Big-O Notation.

0 Answers   Global Logic,






What is the program development process?

0 Answers  


Is it possible to declare abstract class as final?What happens if we do so?

1 Answers  


How does a for loop work?

0 Answers  


What's the purpose of static methods and static variables?

0 Answers  


How do you use nextline in java?

0 Answers  


Java support what type of parameter passing ?

7 Answers   Wipro,


Can a abstract class be defined without any abstract methods?

0 Answers  


Categories