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 the integer of 16?
Why do we need wrapper classes?
How many types of keywords are there?
Is list thread safe in java?
What is an object's lock and which object's have locks in java programming?
What are 5 boolean operators?
What is the difference in between cpp and java? Can u explain in detail?
How is string stored in java?
Which methods cannot be overridden in java?
Is call by reference possible in java?
Is 9 a prime number?
Which arithmetic operations can result in the throwing of an arithmeticexception?
Why is String immutable?
Can bool be null?
What is a vararg?