How would you stop a class from class from being derived or
inherited.

Answer Posted / stavanm

By Creating class as a final

final class A{
// code
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is static class not inherited?

601


What polymorphism means?

624


Is enum a class?

607


What is ambiguity in inheritance?

626


What is byval and byref? What are differences between them?

1692






What do you mean by Encapsulation?

645


What is multilevel inheritance in oop?

557


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1992


What is class in oop with example?

625


Whats oop mean?

601


Why do pointers exist?

665


write a programe to calculate the simple intrest and compund intrest using by function overlading

1671


How is class defined?

588


What are the three main types of variables?

603


What is new keyword in oops?

593