0% found this document useful (0 votes)
3 views1 page

Java Program for User Input Handling

The document shows a Java program that takes user input for a name and number, then prints the name and number back to the user.

Uploaded by

Fari Dia
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Java Program for User Input Handling

The document shows a Java program that takes user input for a name and number, then prints the name and number back to the user.

Uploaded by

Fari Dia
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

package com.

tutorial;
import [Link];
public class Main {

public static void main(String[] args) {


Scanner in = new Scanner([Link]);
[Link]("Enter your name : ");
String name = [Link]();
[Link]("Enter a number : ");
int answer = [Link]();
[Link](name+ " , the number you entered is : "
+ answer);

You might also like