what is the use of final method

Answers were Sorted based on User's Feedback



what is the use of final method..

Answer / the

we can`t change the value of particular varriable

Is This Answer Correct ?    13 Yes 2 No

what is the use of final method..

Answer / kusuma

Final method can't be override in a sub class

Is This Answer Correct ?    6 Yes 0 No

what is the use of final method..

Answer / sudhir sheoran

First of all sealed in c# is equivalent to final in java.

Sealed is used to stop further overriding an abstract method.

E.g:

public abstract class A
{
public abstract void print();
}

public class B:A
{
public sealed override void print()
{
Console.WriteLine("First override");
}
}

public class C:B
{
public override void print() //This will give compilation error.
{
Console.WriteLine("Second override");
}
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

Is it possible to use multipe inheritance in .net

1 Answers  


How can Bitwise OR operator reresents in .Net?? To which alias name a variable points to if it is declared as "int" variable??

1 Answers  


Explain encapsulation

1 Answers   HPCL, Hughes Systique Corporation,


How to create an alias name for a namespace?

4 Answers   IBM,


Is .net framework going away?

0 Answers  






what is entity data model?

0 Answers   Microsoft,


What are the components required to create a route in ASP.Net MVC?

0 Answers  


Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

0 Answers  


About DTS package ?

1 Answers   Accenture, Grafotech,


What platforms does the .NET Framework run on?

1 Answers  


What is connected scenario? : Entity framework

0 Answers  


What are advantages of Dependency Injection (DI) in ASP.Net MVC?

0 Answers  


Categories