Can a class be private in java?



Can a class be private in java?..

Answer / Pappu Kumar Choudhary

Yes, a class can be declared as private. However, it can only be accessed within the file it is defined.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What interface is extended by awt event listeners?

1 Answers  


what is the output??????? public class multireturn { public(int assign x ( int x) { if(4==x) { return 7; } else if (7=x+3) { return 6; } return 5; } }

3 Answers   TCS,


Explain the importance of import keyword in java?

1 Answers  


What is flag in python?

1 Answers  


What is the order of method invocation in an Applet?

1 Answers  


What are decalarations?

1 Answers  


What is the difference between a vector & an array list?

1 Answers   Agilent,


What is meant by string is immutable?

1 Answers  


What is command line argument

1 Answers   TCS,


What are wrapper classes in java?

1 Answers  


What are predefined functions?

1 Answers  


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

1 Answers   Bravura Solutions,


Categories