Computer Science, asked by dilrajsingh498, 3 months ago


write
a programe to print your details in java
using scanner class.​

Answers

Answered by rs5423693
2

Answer:

Example 1

import java.util.*;

public class ScannerExample {

public static void main(String args[]){

Scanner in = new Scanner(System.in);

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

String name = in.nextLine();

System.out.println("Name is: " + name);

in.close();

Similar questions