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
Explain the features of java?
What are the escape sequences in java?
What is the map interface in java programming?
Explain about class in java?
What is set string?
What is style and indentation?
What is the size of int in 64-bit jvm?
What does file separator do in java?
How do you input a string in java?
Which method must be implemented by all threads?
What is primitive array?
Is boolean a data type in java?
Write a program to print count of empty strings in java 8?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
Is sizeof a preprocessor?