A foolish mistake
-
While messing around with Java I made a stupid mistake that took me the better part of the morning to figure out: I gave the project the same name as the name of the main Java class used in the project. You shouldn't do that, I know now, but it had some weird consequences. The main problem was: If I tried to run one of the class's constructors, Java would look for the constructor in the project, not the class! I could not figure out why the compiler kept telling me that the constructor does not exist, while I knew damn well that the class does have such a constructor. :confused: In the end in desperation, I restarted the project under a different name. Problem solved! This is one mistake I will never make again! :mad:
Get me coffee and no one gets hurt!
-
While messing around with Java I made a stupid mistake that took me the better part of the morning to figure out: I gave the project the same name as the name of the main Java class used in the project. You shouldn't do that, I know now, but it had some weird consequences. The main problem was: If I tried to run one of the class's constructors, Java would look for the constructor in the project, not the class! I could not figure out why the compiler kept telling me that the constructor does not exist, while I knew damn well that the class does have such a constructor. :confused: In the end in desperation, I restarted the project under a different name. Problem solved! This is one mistake I will never make again! :mad:
Get me coffee and no one gets hurt!
The only good java is a stong brewed java! :doh:
Anything that is unrelated to elephants is irrelephant
Anonymous
-----
The problem with quotes on the internet is that you can never tell if they're genuine
Winston Churchill, 1944
-----
Never argue with a fool. Onlookers may not be able to tell the difference.
Mark Twain -
The only good java is a stong brewed java! :doh:
Anything that is unrelated to elephants is irrelephant
Anonymous
-----
The problem with quotes on the internet is that you can never tell if they're genuine
Winston Churchill, 1944
-----
Never argue with a fool. Onlookers may not be able to tell the difference.
Mark Twain -
While messing around with Java I made a stupid mistake that took me the better part of the morning to figure out: I gave the project the same name as the name of the main Java class used in the project. You shouldn't do that, I know now, but it had some weird consequences. The main problem was: If I tried to run one of the class's constructors, Java would look for the constructor in the project, not the class! I could not figure out why the compiler kept telling me that the constructor does not exist, while I knew damn well that the class does have such a constructor. :confused: In the end in desperation, I restarted the project under a different name. Problem solved! This is one mistake I will never make again! :mad:
Get me coffee and no one gets hurt!
I think your mistake was coding in Java. :laugh:
Real programmers use butterflies
-
While messing around with Java I made a stupid mistake that took me the better part of the morning to figure out: I gave the project the same name as the name of the main Java class used in the project. You shouldn't do that, I know now, but it had some weird consequences. The main problem was: If I tried to run one of the class's constructors, Java would look for the constructor in the project, not the class! I could not figure out why the compiler kept telling me that the constructor does not exist, while I knew damn well that the class does have such a constructor. :confused: In the end in desperation, I restarted the project under a different name. Problem solved! This is one mistake I will never make again! :mad:
Get me coffee and no one gets hurt!
-
TRWTF is replying to an old message without reading the other responses first. :doh:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
While messing around with Java I made a stupid mistake that took me the better part of the morning to figure out: I gave the project the same name as the name of the main Java class used in the project. You shouldn't do that, I know now, but it had some weird consequences. The main problem was: If I tried to run one of the class's constructors, Java would look for the constructor in the project, not the class! I could not figure out why the compiler kept telling me that the constructor does not exist, while I knew damn well that the class does have such a constructor. :confused: In the end in desperation, I restarted the project under a different name. Problem solved! This is one mistake I will never make again! :mad:
Get me coffee and no one gets hurt!
I wouldn't blame Java for this, it's probably more an issue with the IDE used to handle Java. In NetBeans I give my project names exactly the same name as the main class, and the package name is the same but all lower case as it must be = no issues. NetBeans did change the way it does all this stuff by default some years ago as I recall. Students often fail at this task, but with this simple convention nothing goes wrong.