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...


Define Abstract method & class with Example

Answers were Sorted based on User's Feedback



Define Abstract method & class with Example..

Answer / manoj kumar verma allahabad(ba

Abstract class shows kins of relationship.it is the impure
abstract.Abstract class can have method with body or
without. Abstract class can not be instantiated.e.g. Object
nahi ban sakta abstract class ka.

for example :-
abstract class Shape
{
abstract void area(); // No body compulsory to be
overriding
void show()
{
System.out.println("Shape is the show");
}
}
class circle extends Shape
{
void area()
{

}
void show()
{
System.out.println("Show the circle");
}
}
class Testabstract
{
public static void main(String ar[])
{
circle c1=new Shape(); // error object of
abstract class cannot be made
circle c2=new circle();
c2.area();
c1.show();
}
}

Is This Answer Correct ?    1 Yes 0 No

Define Abstract method & class with Example..

Answer / micheal b

abstract means wrapping the data in sigle unit
class is a user define data type

Is This Answer Correct ?    2 Yes 2 No

Define Abstract method & class with Example..

Answer / ramyathillainathan

We can indicate that a method must always be redefined in a sub class , thus making overriding compulsory. This is done using the modifier keyword abstract in the method definition.
example;
abstract class Shape
{
------------
------------
Abstract void draw();
------------
---------------
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

how will you code the subfile which is in editing mode (multiple case subfile)?

0 Answers   Bank Of America,


what is c sharp dotnet

0 Answers   NIC,


___ method used to move a recordset pointer in nth position in DAG.

1 Answers  


Write a program to find whether a given number is prime or not.

0 Answers   Syntel, Visa,


Diff between Proc transpose and Arrays with example?

2 Answers   Accenture,


What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?

0 Answers  


1.what is the vesition managment.

0 Answers   IBM,


when will triggars the at new event in abap and web dybn pro?

0 Answers   TCS,


Why COBOL/400 is giving 95 session error when opening a file even though the file is having key and the screen or display file is having IND ARA defined?

1 Answers   Freelance,


how does database connection using ADO.NET?

0 Answers  


what is the difference between rename and label

0 Answers   Satyam,


in IBM PC -AT.WAT AT REFERS TO?

0 Answers   IBM,


Categories