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?

Answers were Sorted based on User's Feedback



Can i have abstract class with no abstract methods?..

Answer / m.ahmad

yes, you can create abstract class with out abstract
method. Otherwise you can create abstract methos in
abstract class must you can overwrite in extends class

Is This Answer Correct ?    0 Yes 0 No

Can i have abstract class with no abstract methods?..

Answer / brainindia

yes,abstract class contains non abstract methods and as well
as abstract methods also.

Is This Answer Correct ?    0 Yes 0 No

Can i have abstract class with no abstract methods?..

Answer / 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

Can i have abstract class with no abstract methods?..

Answer / punit

Yes we can, try this example:
abstract class absDemo
{
void hello()
{
System.out.println("Hello abstract");
}
}
class ab extends absDemo
{
void hello1()
{
System.out.println("hello hello1");
}
}
class absDemo1
{
public static void main(String args[])
{
ab a=new ab();
a.hello1();
a.hello();
}

}

Is This Answer Correct ?    0 Yes 0 No

Can i have abstract class with no abstract methods?..

Answer / shraddha

yes abstract class can have zer or more abstract methods

Is This Answer Correct ?    0 Yes 0 No

Can i have abstract class with no abstract methods?..

Answer / manoj

Yes, we can have a abstract class without a abstract method .
But in earlier version like jdk 1.1,it was necessary to have at least one abstract method inside abstract class then latter this restriction was removed by other versions.

Is This Answer Correct ?    0 Yes 0 No

Can i have abstract class with no abstract methods?..

Answer / abhinav

yes we can have abstract classwithout abstract method only
if it has been inherited by another abstract class thats is

Is This Answer Correct ?    0 Yes 1 No

Can i have abstract class with no abstract methods?..

Answer / manish rawat

In abstract class we must declare atleast one abstract
method,because how can a class be abstract without an
abstract method(then what is the difference between
abstract and concrete class)

Is This Answer Correct ?    0 Yes 1 No

Can i have abstract class with no abstract methods?..

Answer / dfg

dfgdsfgds

Is This Answer Correct ?    3 Yes 18 No

Can i have abstract class with no abstract methods?..

Answer / sowju

yes we can have.Abstract class can have one or more abstract
and non abstract methods,but it must contain aleast one
abstract method.

Is This Answer Correct ?    6 Yes 22 No

Post New Answer

More Core Java Interview Questions

what is sendredirect?

7 Answers   TCS,


How many bits is a string in java?

0 Answers  


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

0 Answers  


What interface is extended by awt event listeners?

0 Answers  


Is java util regex pattern thread safe?

0 Answers  


What is boolean query?

0 Answers  


What are features of java?

0 Answers  


What are Font and FontMetrics classes?

1 Answers  


what r callable statement and give their proper use

2 Answers  


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

0 Answers  


What is package protected in java?

0 Answers  


Is an empty arraylist null?

0 Answers  


Categories