veronikaaa86

05. Greeting by Name

May 8th, 2021
531
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class GreetingByName {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         String name = scanner.nextLine();
  10.  
  11.         System.out.println("Hello, " + name + "!");
  12.     }
  13. }
  14.  
RAW Paste Data