|
|
|
|
|
|
Re: errors code while running java on windows after installed [message #1791207 is a reply to message #1791205] |
Tue, 26 June 2018 02:48 |
Phuong Tran Messages: 10 Registered: June 2018 |
Junior Member |
|
|
I also followed your suggest, delete everything under java/src but not the src itself. Then, right click on src, create new-->class (when I tried to enter the "name", a message located on top of screen stating: the use of the default package is discouraged). I still created anw disregard the message, with the same code as above:
public class retail {
public static void main(String[] args) {
int itema=200, itemb=75, itemc=500;
double price;
price=((itema*2)+(itemb)+ (itemc*3));
price=price-(.1*price);
price=price+(.05*price);
System.out.println(price);
}
}
It did not give me error message like above, but it showed nothing after I hit run. I would be able to create HelloWorld1.java file and it outputs "Hello world". But it does not run for the above example (retail shop, as a class). Please advise
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11257 seconds