• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

regarding package concept in java class not found

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
Don't mistake me.This is small doubt for you.i need one clarification from you regarding package concept in java.
I have develop the sample class called Foo.java it is available under directory D:\rram
public class Foo {
public Foo() { System.out.println("Foo"); }
}
It will compile Success
another file Name is Bar.java it is available under directory D:\rram
package com.test;
import Foo;
public class Bar {
public Bar() { System.out.println("Bar"); }
public static void main(String[] args) {
Bar bar = new Bar();
Foo foo = new Foo();
}
}
I have try to compile this program i got the Following error:
Bar.java:4: Class Foo not found in import.
import Foo;
^
1 error
can any one help me to solving this problem
regards
ramanarayanan
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not cross post.
Continue the conversation here.
 
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic