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

How is hashset defined in java?

737


Can you declare the main method as final?

727


Is array a class in java?

733


List the interfaces which extends collection interface?

738


What are keywords in java?

772


Where is jre installed?

803


What is volatile keyword in java

881


Can an integer be a string?

718


Difference between character constant and string constant in java ?

784


What is java thread dump, how can we get java thread dump of a program?

777


Write a java program to print fibonacci series?

755


Can we override compareto method?

726


How do I enable java in safari?

781


Is .net better than java?

777


How to instantiate member inner class?

843