This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package problem ?

 
satish limaye
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the dir structure
c:\java\suncert\OverLoadEx\OverLoadEx.java
When I try to compile it in the dir
c:\java\suncert\OverLoadEx java OverLoadEx.java
I get an error
OverLoadEx.java:1: OverLoadEx clashes with package of same name
Here is the file :
class OverLoadEx
{
public static void main(String args[])
{
int x;
long y;
}
}
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So it thinks that there might be a confusion between the package (subdirectory) with that name - or the class with that name.
Change one of them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic