Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Another confused question about package

 
Mike Lin
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set classpath to c:\m,
first ,at path c:\m compile class A

compile success.
then another class B"

compile failed!
B.java:3: cannot resolve symbol
symbol : class A
location: class pa.B
public class B extends A {}
^
1 error
 
John Ip
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you put your class B file inside a subdirectory which is the same as your package name?
johnny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic