I am making a basic currency converter which takes a users choice of currency and converts the amount, obviously not finished as I have ran into this problem. Help and pointers would be appreciated.
import java.util.Scanner;
class Converter {
public static void main(String args[]){
double PLN;
double GDP;
System.out.println("Which currency do you wish to convert?");
System.out.println("Press a corresponding number");
System.out.println("1. Great British Pound (GDP) £");
System.out.println("2.Polish zloty (PLN) zl");
Scanner option = new Scanner(System.in);
if (option = 1){
}
}
}
Error
Exception in thread "main" java.lang.Error: Unresolved compilation problems: Type mismatch: cannot convert from Scanner to boolean Type mismatch: cannot convert from int to Scanner at Converter.main(Converter.java:14)