Hello!
public static void main(String[] args)
{
System.out.println("Type the operation system (Windows or Linux):");
Scanner oku= new Scanner(System.in);
String os=oku.next();
if(os=="Windows")
{
CreateForWindows();
}
if(os=="Linux")
{
CreateForLinux();
}
else
{
System.out.println("Wrong selection. Program closed.");
return;
}
return;
It always show me Wrong selection. Program closed. I can not understand why it does not go inside on any if block. I printf also the String os to see if it is equals on windows or Linux, which shows me exactly what i type. How that possible so simple thing...