desislava_topuzakova

01. Greeting By Name

Oct 17th, 2021
741
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class GreetingByName_01 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         //1. прочитаме име -> текст
  8.         //2. отпечатвам: "Hello, <name>!"
  9.         String name = scanner.nextLine();
  10.         System.out.println("Hello, " + name + "!");
  11.     }
  12. }
  13.  
RAW Paste Data