can we declare private class in java file?

Answer Posted / veerendra

yes,we can declare if it is inner most class, but outer
class is not allowed because java supports inheritance
concept for reusing the properties from super class to sub
class,at that time the super class is private it wont access
inside,only public features we can reuse it, we can access
and execute through out the world, not private with in the
class onle we can access it.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static class and normal class?

526


What is ph and buffers?

516


Explain the difference between map and flatmap stream operation?

812


How to sort array in descending order in java?

506


What are the basic concepts of OOPS in java?

564






What is sortedmap in java?

546


What is polymorphism and what are the types of it?

494


Can we define private and protected modifiers for the members in interfaces?

529


What is java console application?

554


How do you define a set in java?

502


What is java jit compilers?

554


Can this keyword be used to refer static members?

540


What exactly is java?

504


What is the meaning of flag day?

534


Which containers use a flowlayout as their default layout in java programming?

502