What is the effect of declaring a method as final of declari

What is the effect of declaring a method as final? of declaring a class as final? A variable? A parameter?

Solution

What is the effect of declaring a method as final? of declaring a class as final? A variable? A parameter?

sol:

->if we declare a method as final we cannot override it
->if we declare class as final we cannot inherit it
->if we declare variable as final we cannot change its value ,it will become constant
->if we declare parameter as final there will no change it will constant and we can assign only once

What is the effect of declaring a method as final? of declaring a class as final? A variable? A parameter?SolutionWhat is the effect of declaring a method as fi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site