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

What are the benefits of polymorphism?

855


Why do we use inheritance?

815


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2055


What are classes oop?

789


What is polymorphism in oops with example?

758


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1846


What is the diamond problem in inheritance?

815


What is abstraction in oop with example?

852


Can an interface inherit a class?

777


What is debug class?what is trace class? What differences are between them? With examples.

1848


Whats oop mean?

787


What are the two different types of polymorphism?

886


Write a program to reverse a string using recursive function?

2021


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1618


What is the full form of oops?

908