This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Abstract classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract classes" Watch "Abstract classes" New topic
Author

Abstract classes

Keshan Pillay
Greenhorn

Joined: May 21, 2008
Posts: 29
Hello everyone!

Could someone please explain what an abstract class is and what it's used for? I'm having trouble grasping the concept. I've also been unable to find anything online that is helpful to me personally. If think something might help, please link!

Many Thanks
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Hi check this link Abstract class


Thanks,
Sherif
kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Hi Pillay,
Abstract class are those class which may contain abstarct methods, and abstract methods are those which don't have definition.
example-

Since abstract class is partially implemented so it can't be instantiated.
In real world it is used for giving default behavior to the implememnting class.
Note that it's not necessary for an abstract class to have abstract method.

If you are newbie to java just start with Head first, then go ahead with "thinking in java" by bruce eckel and scjp exam study guide by kathy.
For any other help just send me private messages, i'll defietly help you out.

[edit]Add code tags. CR[/edit]
[ October 14, 2008: Message edited by: Campbell Ritchie ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38036
    
  22
Please use the code button when posting code; you can see how much better it looks with the indentation.
And please keep all discussion on the forum; everybody can then learn from it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract classes
 
Similar Threads
perfect example for abstract class
ABSTRACT
HttpServlet
struts DispatchAction
why we need to declare a class abstract??