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 all methods are used to prevent thread execution ?
What is java algorithm?
Is there a jre for java 11?
how can you catch multiple exceptions in java?
What are the different types of garbage collectors in java?
What is the difference between overriding and overloading in OOPS.
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
What is a default method?
What is a methodologist?
What are bind parameters?
Is break statement can be used as labels in java?
What does opcode mean?
How do you use parseint in java?
What is a constructor, constructor overloading in java?
Which sorting algorithm is in place?