what is the use of final method
Answers were Sorted based on User's Feedback
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 |
Can a nested object be used in Serialization
How do you sort a dataset?
what is eager loading?
Is http stateful or stateless?
How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?
What are child actions in ASP.Net MVC?
How to answer for project questions..?
What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application?
Why is entity framework used?
What is main objective of asp.net mvc 4 or what is new in mvc4 ?
What is reflection?
5 Answers Accenture, Merrill Lynch, Microsoft,
What are class access modifiers