Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What does the “final” keyword mean in front of a variable? A method? A class?

957


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2777


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

993


Which browsers work with java?

1032


Differentiate between == and equals().

1011


What are methods and how are they defined?

1151


What is static block?

1074


How to create com object in Java?

1021


What is a java list?

1057


What is a parameter used for?

930


Can we restart a thread already started in java?

1060


Can list be null in java?

994


what is collatration?

3242


What are the changes in java.io in java 8 ?

979


What is a predicate method?

968