Home » Interview » Technology

What is final method?

Correct Answer: Final method is a method defined in the super class with final modifier We cannot overriding final method of super class in the sub class EX: Class Sample { final void funOne() { } void funTwo() { } } Class Sub extends Sample { void funOne() { // overriding is not allowed } viod funTwo() { //overriding is allowed } }

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion