This is another newbie question. I have been working this type of error for the last couple of days and have been getting nowhere so it is time to ask you, the adoring wonders of the Java world.
I'm getting the error that there cannot be converted from double to int.
This is the code that I have written:
out.printf("Enter the price of the first article:");
double priceFirstArticle = in.nextDouble();
int i = priceFirstArticle; //ERROR*****//
out.printf("Enter the price of the second article:");
double priceSecondArticle = in.nextDouble();
int s = priceSecondArticle; //ERROR*****//
out.printf("Enter the price of the third article:");
double priceThirdArticle = in.nextDouble();
int t = priceThirdArticle; //ERROR*****//
How can I fix this error?
Thank you for your help,
Northwill