Created
February 14, 2019 03:25
-
-
Save aayauf/b5073705974765a43823180471c0cbee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
} | |
}*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?