Skip to content

Instantly share code, notes, and snippets.

@aayauf
Created February 14, 2019 03:25
Show Gist options
  • Save aayauf/b5073705974765a43823180471c0cbee to your computer and use it in GitHub Desktop.
Save aayauf/b5073705974765a43823180471c0cbee to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.print("What is your name?");
String name = input.next();
System.out.printIn();
System.out.printIn("Hello" + "name" + ", welcome to your new Java coding journey!");
}
}
/*import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.print("What is your name?");
String name = input.next();
System.out.println();
System.out.println("Hello "+ name +", welcome to your new Java coding journey!");
}
}*/
@aayauf
Copy link
Author

aayauf commented Feb 14, 2019

Hi Githubbers,

Does anyone know what is wrong with the first set of code? I did those from scratch and it produced errors. The second set was copied and pasted and modified to produce intended results and it did fine. To me, they are both exactly the same. The error messages that came up were all "cannot recognize sympbol" and all of them points to the period symbol on the first set. Anybody, has ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment