62 523
Assignments Done
98,7%
Successfully Done
In June 2018

Answer to Question #3542 in Java | JSP | JSF for Y mukundareddy

Question #3542
(1) Write a program to take your name as input and print it on console?
Expert's answer
import java.util.Scanner;

public class Greeting {
public static
void main(String[] args) {
System.out.print("Enter your name:
");
Scanner scanner = new Scanner(System.in);
String name
= scanner.nextLine();
System.out.println("You have entered: " +
name);
}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions