Post new code. When you do wrap it in highlight tags. Read the linkto BB code near the bottom of the page.
Type: Posts; User: Junky
Post new code. When you do wrap it in highlight tags. Read the linkto BB code near the bottom of the page.
What if the if statement is false? What value will price have then?
String s;
System.out.println(s);
What should be displayed? The variable s has not been given a value. You have the same problem in your code.