I made a simple java program that works on console and I have a error I never had before. There are no errors in my code but for some reason I can't run the program cause of my 'public class serie' that is never used.
this my code:
import java.math.BigInteger;
import java.util.Scanner;
public class serie {
public final void main(String[] args) throws Exception {
final int BASE = 36;
final BigInteger MODULO = new BigInteger("ZV", BASE);;
Scanner keyboard = new Scanner(System.in);
String strChassisNummer;
String input = "y";
while (input == "y"){
try{
System.out.print("Geef een chasis nummer in:");
strChassisNummer = keyboard.nextLine();
BigInteger chassisNummer = new BigInteger(strChassisNummer,
BASE);
BigInteger remainder = chassisNummer.remainder(MODULO);
System.out.print(strChassisNummer);
System.out.print(";");
String paddedRemainder = remainder.toString(BASE);
if (paddedRemainder.length() == 1)
{
System.out.print("0" + paddedRemainder.toUpperCase());
}
else
{
System.out.print(paddedRemainder.toUpperCase());
}
System.out.println();
System.out.print("Wenst u nog een chasis nummer in te geven ? (y/n): ");
input =keyboard.nextLine();
if (input != "y"){
break;
}
}
catch (Throwable t){
t.printStackTrace();
}
}
}
}
Thanks in advance !