1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nata0808 [166]
3 years ago
11

Write an application that displays appropriate prompts to the user and reads a person

Computers and Technology
1 answer:
vfiekz [6]3 years ago
3 0

Answer:

The program to this question can be given as:

Program:

import java.util.*; //import package  

public class Person_detail //define class

{

public static void main(String ar[]) //define main function

{

String Name,hobby,dream_Job; //declare variable.

int age;

Scanner sc = new Scanner(System.in); //creating Scanner class object for user input.

System.out.print("Enter Your Name : "); //message  

name = sc.next(); //user input

System.out.print("Enter Your Age : ");

age = sc.nextInt();

System.out.print("Enter Your hobby: ");

hobby = sc.next();

System.out.print("Enter Your aim: ");

aim = sc.next();

//print values.

System.out.println("Hello, my name is "+name+" and I am "+age);

System.out.println("years old.My hobby is playing "+hobby+".");

System.out.println("I want to be a "+aim+" when I grow up!");

}

}

Output:

Hello, my name is XXX and I am 21

years old.My hobby is playing cricket .

I want to be a cricketer when I grow up!.

Explanation:

In the above program firstly we import the package for user input. Then we declare a class that is Person_detail. In this class, we declare the main function. In the main function, we declare a variable that is name, hobby, aim, and age. In these variable first 3 variables datatype is string and age variable data type in integer. Then we create a scanner class object and take input from the user and print it into a paragraph.

You might be interested in
What is another word for violation
serg [7]

Answer:

Infringement

Explanation:

The others are incorrect

4 0
3 years ago
(iii) If 1 GB = 2x<br>then what is the<br>value of x?​
frez [133]
Since a Gigabyte is made of Megabytes, 500 Megabytes times 2, 2(500MB), is equal to one Gigabyte. (1000MB)
UNLESS, it wants the Windows way of storage, because one Gigabyte in Windows terms is actually 1024 megabytes... then it’d be 2(512MB) because 512MB and 512MB equals one windows storage gigabyte.
4 0
3 years ago
What is the best way to catch a particular sporting moment?
pochemuha

Answer:

Know the sport really well so you can anticipate the moment when something exciting might happen. - c

3 0
3 years ago
Read 2 more answers
How far is florida from oklahoma?
leonid [27]
Florida is 1,344.8 miles from oklahoma
7 0
3 years ago
Read 2 more answers
Can Anyone Send Me The Correct Code To This ?<br><br> ITS JAVA
scoundrel [369]

Answer:

whta u mean by code?

Explanation:

8 0
3 years ago
Other questions:
  • Which skill refers to the ability to visualize and implement possible business solutions to problems?
    6·1 answer
  • ___________ is produced by propulsion systems or engines.
    6·1 answer
  • ______was developed as an interim management protocol with OSI as the ultimate network management protocol.
    5·1 answer
  • A bicycle combination lock has four rings with numbers 0 through 9. Given the actual numbers and the combination to unlock, prin
    13·1 answer
  • How do you delete answers on Brain.ly?
    11·2 answers
  • How I to turn this ''loop while'' in ''loop for''? var i = 0; while (i &lt; 20) { var lineY = 20 + (i * 20); line(0, lineY, 400,
    11·1 answer
  • PLS HELP
    5·1 answer
  • The address for the website you want to visit is called the browser internet URL World Wide Web
    5·2 answers
  • My assignment asks me to write a python program using if, elif, and else that takes a user's salary and calculates the tax based
    7·1 answer
  • windows switches to secure desktop mode when the uac prompt appears. what is the objective of secure desktop mode?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!