package javaapplication11;
if (taxRate > 0)
public static void main (String [] args);
{
double taxAmount;
taxAmount = subTotal * taxRate;
total = subtotal + total;
}
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
package javaapplication11;
if (taxRate > 0)
public static void main (String [] args);
{
double taxAmount;
taxAmount = subTotal * taxRate;
total = subtotal + total;
}
you should read through this Trail: Getting Started (The Java™ Tutorials)
Try to understand the main function is static and cannot be called but in main functions you can call functions and constructors.
So,
Try storing the code of main function in functions or constructors and then call it.
dannyboi
This thread is just a new-code version of the same other three threads you created. I want you to know the rules on the forum are to help the people who answer questions. If you can not make it easy for us to help you for free, I have no time to help you.
copeg (July 23rd, 2012)
ok... I'll answer the obvious... although I'm not sure what you are trying to accomplish your main method is wrong. Just remove the ';'
You might want to revisit how mains are used to invoke an action, i.e. set your program in motion... it doesn't look like you quite have a handle on it just yet.public static void main(String[] args) { double taxAmount; taxAmount = subTotal * taxRate; total = subtotal + total; }
f34r th3 kut3 1z