Advertisement
veronikaaa86

05. Greeting by Name

May 7th, 2022
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P05GreetingByName {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. String name = scanner.nextLine();
  8.  
  9. //Hello, Veronika!
  10.  
  11. System.out.print("Hello, " + name + "!");
  12. }
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement