Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Trouble with Java label and other results not displaying properly

Posted on 2010-01-08
2
Medium Priority
?
331 Views
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.
0
Comment
Question by:rufustmac
2 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 26262500
please post your source code
0
 
LVL 6

Accepted Solution

by:
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
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

577 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