Can i have abstract class with no abstract methods?
Answer Posted / priyank
Yes we can have an abstract class without abstract method
in c#.net.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Abstractdemo
{
abstract class A
{
public void Data()
{
Console.WriteLine("this is data");
}
}
class B : A
{
public void Data1()
{
Console.WriteLine("this is B");
}
}
class Program
{
static void Main(string[] args)
{
B b1 = new B();
b1.Data();
}
}
}
FYI
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is java full form?
What happens when you add a double value to a string?
Can an unreferenced object be referenced again?
Name some classes present in java.util.regex package.
What is the use of coding?
Is java jre still free?
How to perform linear search in java?
Explain a few methods of overloading best practices in java?
What's the base class in java from which all classes are derived?
Why pointers are not used in java?
How many types of threads are there in java?
Differences between traditional programming language and object oriented programming language?
Explain 5 io best practices?
Do extraneous variables affect validity?
What is a lock or purpose of locks in java?