| Author |
query
|
ajay_kumar_rana
Greenhorn
Joined: Feb 03, 2008
Posts: 6
|
|
|
public abstract class Canine { public Bark speak(){};} Will it compile ? Why or Why not. For reference see page no. 74 question 2. Because when i am writing this code in eclipse it is showing error like Bark can't be resolved but Kathy ciera's book says that this is compilable.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56162
|
|
"AjayKumarRana", you have previously been warned via private message regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post. Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Be aware that accounts with invalid display names are disabled. bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
ajay_kumar_rana
Greenhorn
Joined: Feb 03, 2008
Posts: 6
|
|
Originally posted by Bear Bibeault: "AjayKumarRana", you have previously been warned via private message regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post. Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Is it okay sir. Be aware that accounts with invalid display names are disabled. bear JavaRanch Sheriff
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
Please, put your new comments outside the quoted stuff. Otherwise it's very hard to read. No, your name is not OK - but thank you for attempting to fix it. Underscores (the '_' character) are not acceptable as part of real names. Please use a space instead. Thanks. As for your original question: "it is showing error" is not very helpful. What error are you seeing? Please copy and paste the text of the error message you see. As for your original question, it seems obvious that the code you showed will not compile. Where in Kathy Sierra's book does it say otherwise?
|
"I'm not back." - Bill Harding, Twister
|
 |
Amod Mulay
Ranch Hand
Joined: Apr 06, 2006
Posts: 33
|
|
id does not compile as it does not know what is the type "Bark". unless you have a class by the name of Bark and have imported in your abstract class it will not compile.. please go through the book properly befor commenting that it does not work. the compiler has to understand the return type!!!
|
 |
Amod Mulay
Ranch Hand
Joined: Apr 06, 2006
Posts: 33
|
|
id does not compile as it does not know what is the type "Bark". unless you have a class by the name of Bark and have imported in your abstract class it will not compile.. please go through the book properly befor commenting that it does not work. the compiler has to understand the return type!!!
|
 |
 |
|
|
subject: query
|
|
|