• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

basic test

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a Folder Test.
Create a folder in Test folder, name it A
Create two files; TestParent.java and TestChild.java
code of TestParent.java
----------------------------------
package Test.A;
public class TestParent{}

code of TestChild.java
----------------------------------
package Test.A;
public class TestChild extends TestParent{}

TestParent.java compiles fine but TestChild gives an error saying that cannot resolve symbol TestParent. Why?
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did. Both files are compiling. Check your class path.
-----------------
Sainudheen
 
Narsimha Manekar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
Before posting this question I had set %CLASSPATH%;.; and compiled. Still did not work. I couldn't think what else could have gone wrong. After reading your reply I manually typed entire path in the classpath, then it worked.
 
reply
    Bookmark Topic Watch Topic
  • New Topic