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 difference between private & public & friendly classes?
What Is Query Throttling in java?
What is the purpose of finalization in java programming?
How will you initialize an Applet?
How do you get length in java?
What are recursive functions?
What are keywords in java?
What are void methods?
What does business logic mean?
What is a flag variable?
How to create a custom exception?
What is static in java?
What does it mean that a method or field is “static”?
What is an example of declaration?
How will you invoke any external process in java?