| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0 Thanked 5 Times in 5 Posts Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5
|
abstract means what in Java?
Friends, what is the meaning of abstract in Java?
We see abstract class, abstract method... What is the word mean abstract? |
|
|
|
|
|
#2 (permalink) |
|
Member
Join Date: Jan 2007
Posts: 32
Thanks: 3 Thanked 3 Times in 3 Posts Thanks: 3
Thanked 3 Times in 3 Posts
Rep Power: 2
|
Re: abstract means what in Java?
Abstract class is a class that provides some invariant functionality but leaves implementation of other members to inheriting classes. You can accomplish this through the use of abstract classes, which are classes that must be inherited.
Abstract classes are similar to interfaces, but share many features with classes. An abstract class cannot be instantiated on its own; it must be inherited first. Abstract classes can provide all, some, or none of the actual implementation of a class. Like interfaces, they can specify members that must be implemented in inheriting. Abstract method is the element or member function in abstract class. Abstract Class should have at least one abstract mehtod in it. The word Abstract in oops refers to hiding of the implementation.
__________________
Cheers, Laxmi Last edited by sk_kireeti; 02-02-07 at 06:52 PM. |
|
|
|
|
|
#3 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: abstract means what in Java?
I completely agree with Laxmi Narayana.
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
|
|
#4 (permalink) |
|
Member
Join Date: Aug 2006
Location: Parli-V
Age: 24
Posts: 77
Thanks: 24 Thanked 9 Times in 8 Posts Thanks: 24
Thanked 9 Times in 8 Posts
Rep Power: 5
|
Re: abstract means what in Java?
Take a simple example in real life different companies make bikes like as Hero-Honda,Bajaj,Suzuki,& so on.But in all example one commone thing is bike and so bike is the example of abstract.Actually abstract means we define one object or one behaviour which is must implement with your other behaviours.
Means bike is common to all but herohonds presends different functionality with bike,suzuke present some different function than other & so on.i hope you all understand what is abstract which i said.
__________________
Thanks & Regards Avadhoot S Dharmadhikari Hyderabad |
|
|
|
|
|
#5 (permalink) |
|
Banned
Join Date: Oct 2006
Location: India
Age: 25
Posts: 33
Thanks: 1 Thanked 4 Times in 4 Posts Thanks: 1
Thanked 4 Times in 4 Posts
Rep Power: 0
|
Re: abstract means what in Java?
A class containing abstract method is must be declared as Abstract. It serves as a template. An Abstract class can't be instantiated. Abstract class must be extended/subclassed for it to be implemented. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated. Abstract class is a class that provides some general functionality but leaves specific implementation to its inheriting classes.
Example of Abstract class: abstract class AbstractClassExample{ protected String name; public String getname() { return name; } public abstract void function(); } Example: Vehicle is an abstract class and Bus Truck, car etc are specific implementations For more information check out Abstract class and interface |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| JAVA WEB SITES | yathish | JAVA Technologies | 2 | 20-11-08 12:11 AM |
| Mega Free Download S/W Links A-Z | yathish | OTHERS | 513 | 30-09-08 02:49 PM |
| JAVA Downloads | yathish | JAVA Technologies | 2 | 22-01-07 01:37 PM |
| java notes | naga | JAVA Technologies | 5 | 22-09-06 10:30 PM |