can we make a class static without using static keyword?

Answer Posted / mamta subramanian

We cannot declare any outer class as static. There would a
compiler error if we do so.
But if it is an inner class we can declare it as static.
and it act as a static object of outer class.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use polymorphism?

573


How is polymorphism achieved?

583


What is variable example?

593


Can we override main method?

604


What are the three parts of a simple empty class?

1458






Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3827


What is the difference between procedural programming and oops?

550


class type to basic type conversion

1835


What is encapsulation in simple terms?

537


What are the 3 principles of oop?

616


What is ambiguity in inheritance?

625


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1147


Why do we use class in oops?

555


what is the sylabus for priliminaries?

1685


What is multilevel inheritance?

723