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
Which of the following are drivers of machine learning growth?
alukav5142 [94]

Answer:

machine learning

Explanation:

4 0
3 years ago
What is the final value of the string output given the following code fragment? int counter = 0; int num = 0; string output = ""
swat32

int counter = 0;

int num = 0;

string output = "";

while (counter < 3) {

num = num * 1;

counter = counter + 1; }

output = Convert.ToString(num);

Output:

Counter = 0

num = 0 * 1 - - > num = 0

Counter = 1

num = 0 * 1 - - > num = 0

Counter = 2

num = 0 * 1 - - > num = 0

Counter = 3 (break)

num = 0

output = "0"

3 0
4 years ago
Which option will enable Mina to apply several formats to the spreadsheet cells at the same time?
madam [21]
Applying a cell style will enable Mina to apply several formats to the spreadsheet cells at the same time.  <span>To apply several formats in one step, and to make sure that cells have consistent formatting, you can use a cell style. A cell style is a defined set of formatting characteristics, such as fonts and font sizes, number formats, cell borders, and cell shading. </span>
4 0
4 years ago
What is it called when you want to automatically create columns that are the same length in a newsletter?
babunello [35]
Its called column creation
7 0
3 years ago
15. The legal right to control the
Iteru [2.4K]
The correct answer copyright
4 0
3 years ago
Read 2 more answers
Other questions:
  • If an administrator wanted to change the IP configuration settings on the first Ethernet interface to 10.1.1.1 and the netmask t
    12·1 answer
  • By default, EC2 instances pull SQS messages from an SQS queue on a FIFO basis.
    6·1 answer
  • Identify the characteristics of logic problems.select all that apply
    5·1 answer
  • WILL GIVE BRAINLIEST ANSWER!!!<br><br> How do you manage your screen time?
    8·2 answers
  • Match the feature to its function.
    7·1 answer
  • Using only AND, OR and inverter gates to implement the above Boolean equation, how many gates are needed
    8·1 answer
  • The diagram shows the positions of the Sun, Earth, and Moon during each moon phase. When viewed from Earth, at what point does t
    15·1 answer
  • Aisha designed a web site for her school FBLA club and tested it to see how well it would resize on different systems and device
    5·1 answer
  • Which statement best describes one reason why assembly language is easier
    14·1 answer
  • What is the process of ensuring that corporate security policies are carried out<br> consistently?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!