Computer Science, asked by sameekshakrv, 1 day ago

write a java program to ask your name and print hello followed by name

Answers

Answered by harinder172j
0

Answer:

Hope it's correct thank you ♡(∩o∩)♡

Attachments:
Answered by atrs7391
1

import java.util.Scanner;

public class hello_name {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter your name: ");

       System.out.println("Hello " + sc.nextLine());

   }

}

Similar questions