This is my second post in the past couple of hours about a compiler error, but that was my fault. This time I'm almost 100% i followed the steps correctly in the tutorial and this simple class should compile just fine. I've listed the errors as comments.
Code:
import java.util.Scanner;
class VersatileSnitSoft {
public static void main(String args[]) {
Scanner myScanner - new Scanner(System.in);
//error ';' expected line 6 ^
double amount;
//Now here I've set the keyword double to the variablename amount
System.out.print("What's the price of a CD-ROM? ");
amount - myScanner.nextDouble();
//error: not a statement line 10 ^
amount - amount + 25.00;
//error: not a statement line 11 ^
System.out.print("We will bill $");
System.out.print(amount);
System.out.println(" to your credit card.");
}
}
any help would be greatly appreciated thank you for your time.
I really just want to know why my
amount - myScanner.nextDouble(); isnt' a statement and how do I make it a statement.
I just started with variables and I by no means am good at this yet.