Trouble with Java label and other results not displaying properly

Posted on 2010-01-08
Medium Priority
Last Modified: 2013-12-22
I am having a hard time with a java label displaying something that isn't anywhere in my code that I am able to find and it's driving me nuts.  I'm wondering if it's something weird with the compiler because I had the class HedgeYourBetUsingFile.java and then I renamed that file to HedgeYourBetUsingFile2.java and recompiled.  I changed a few minor things including adding a label for "best score" instead of just the previous score played.  However, regardless of how I change the "best score" label it continues to show up as "previous score" even though I don't have that text anywhere in my code.  Also the "best score" portion is not working and it is still functioning like it is retrieving the "previous score" from the .dat file rather than the highest value.  Is it possible some how that the compiler and/or the .class file is stuck on the previous version?  I just can't think of any other reason this would happen.  Any help is appreciated.
Question by:rufustmac
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 40

Expert Comment

ID: 26262500
please post your source code

Accepted Solution

Ravi Kalla earned 2000 total points
ID: 26272720
Did you change the class name in "HedgeYourBetUsingFile2.java" from "HedgeYourBetUsingFile" to "HedgeYourBetUsingFile2"? I think you haven't changed that. So, this will lead to the compilation problem which you might not have observed. Follow the below steps to make the program work:

Step1 : Change the class name in the file "HedgeYourBetUsingFile2.java" to "HedgeYourBetUsingFile2"
Step2 : Compile the above source file
                   Eg: javac HedgeYourBetUsingFile2.java
Step3 : Make sure that the new class file (HedgeYourBetUsingFile2.class) is created after Step2 is success
Step4 : Execute the class file (HedgeYourBetUsingFile2.class) that is newly created
                   Eg: java HedgeYourBetUsingFile2

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question