I am sorry if i have posted this in the wrong section, but I'm new here and this seemed the most logical place to me.
I am very new to programming, and to the Eclipse environment. I have had this problem before, and am having it now with Eclipse that it will not accept my curly braces, and sometimes my ;.
It has an error saying it expects } to complete method body, or { expected after this token. I don't have the specifics on the ;, but it gets flagged too. As far as I can tell I have the punctuation in the correct place, but it will not run. It will also pop up an error periodically saying the default setting have changed and ask if I would like to retrieve the default settings or ignore. I don't know that I've made any changes, so I restore the defaults, and then my auto-corrections seem to work better. Do you think I need to re-download the program? I am running version 3.6.0.
Here is my code if you want to double check me... maybe I am crazy, or really not doing as well as I thought I was. I've indicated the areas where errors are with // to the right side of the lines its occuring.
public class Exercise41 extends CashRegister { public static void main(String[] args) { // get error here for { private static final double QUARTER_VALUE = 0.25; // declare constant private static final double DIME_VALUE = 0.10; // declare constant private static final double NICKEL_VALUE = 0.05;//declares constant private static final double PENNY_VALUE = 0.001; // declares constant } public class CashRegister { // get error here for } this.CashRegister = new CashRegister(); register.recordPurchase(20.37); register.enterDollars(20); register.enterQuarters(2); System.out.println("Change: " + register.GiveChange()); System.out.prinln("Expected: 0.13"); } }