Results 1 to 1 of 1
Thread: Cannot find symbol
- 03-06-2010, 03:03 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 4
- Rep Power
- 0
Cannot find symbol
Hello,
I have a problem when compiling my program on "cmd", i receive the error "cannot find symbol"
Here's my code :
XML Code:package StrategyPattern; /** * * @author Sarah */ public interface Quackable { public void makeSound(); }XML Code:package StrategyPattern; /** * * @author Sarah */ public interface Flyable { public void fly(); }The classes Quackable and Flyable compile fine, but i get the error when I try to compile the Duck class. The program is working fine on NetBeans.XML Code:package StrategyPattern; /** * * @author Sarah */ public abstract class Duck { Quackable quack; Flyable fly; String name; public abstract void display(); public void setSound(Quackable quack) { this.quack=quack; } public void setFly(Flyable fly) { this.fly=fly; } public void makeSound() { quack.makeSound(); } public void fly() { fly.fly(); } }
Here's one of the errors when compiling the Duck class:
Duck.java: 14: cannot find symbol
symbol: class Quackable
location: class StrategyPattern.Duck
Quackable Quack
The rest of the errors are similar to this one but it says cannot find symbol "Flyable fly" .
Thanks in advance.
Similar Threads
-
Can not find symbol ???
By AliceNewbie in forum New To JavaReplies: 1Last Post: 02-17-2010, 01:44 AM -
cannot find symbol constructor
By daud in forum New To JavaReplies: 9Last Post: 08-13-2009, 03:53 AM -
cannot find symbol
By GabWit in forum New To JavaReplies: 3Last Post: 01-25-2009, 12:13 AM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
cannot find symbol symbol : class Item location: package platypos.services.order
By officialhopsof in forum New To JavaReplies: 3Last Post: 05-01-2008, 08:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks