can we create object for static class in java

Answer Posted / sandeep

an outer class cannot be static.it can only be declared as
pubic,abstract or final OR a combination..

an inner static class behaves just like a normal static member..

n yes v can creat an object of inner static class as....

Outer.Inner obj=new Outer.Inner();

Is This Answer Correct ?    38 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main uses of java?

529


What is static block?

594


What is lambda programming?

500


What is a map? What are the implementations of map?

568


Explain the difference between abstract classes and interfaces in java?

601






Where is java located?

501


Which collection allows duplicate values in java?

546


What is the purpose of main function in java?

541


What is += mean in java?

545


What is array initialization in java?

497


Difference difference paint() and paintcomponent()?

533


What does it mean that a class or member is final?

559


How does predicate work in java?

543


What is the role of garbage collector in java?

495


What is a jit compiler?

640