String input = input; // is not acceptable because... input variable is already there...
it gives compile error......at this point ....
if we change String input1 = input;System.out.println(""+output1);
the code will run fine output is ===
Welcome,Player,to 0verload.
Type your name,player
> //cursour waits here for user input ... if u give input like uname...than output
Welcomeuname
modified code
import static java.lang.System.out;
import static java.lang.System.*;
import java.util.Scanner;
public class game {
public static void main(String[] args) {
System.out.println("Welcome,Player,to 0verload.");
System.out.println("Type your name,player");
for (
{
out.print(">");
Scanner keyboard = new Scanner(System.in);
String input = keyboard.next();
String playername = "Player";
String input1 = input;
out.println("Welcome " + input1);
}
}
}
note :: playername variable is neverused ... and .. unused import system.lang