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
scoundrel [369]
4 years ago
5

Assume that name and age have been declared suitably for storing names (like "Abdullah", "Alexandra" and "Zoe") and ages respect

ively. Write some code that reads in a name and an age and then prints the message "The age of NAME is AGE." where NAME and AGE are replaced by the values read in for the variables name and age. For example, if your code read in "Rohit" and 70 then it would print out "The age of Rohit is 70.".
Computers and Technology
1 answer:
Irina18 [472]4 years ago
3 0

Answer:

import java.util.Scanner;

public class num2 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Name");

       String name = in.next();

       System.out.println("Enter Age");

       int age = in.nextInt();

       System.out.println("The age of "+name +" is "+age);

   }

}

Explanation:

Java programming language is used to write the code.

The scanner class is used to prompt and receive values for name and age which are stored in the appropriate variables.

The key idea here is using string concatenation in the output statement in order to print the desired output

You might be interested in
A town decides to publicize data it has collected about electricity usage around the city. The data is freely available for all
tigry1 [53]
The answer is C.open data
8 0
3 years ago
If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
Paraphin [41]
You literally don’t do anything you’re just like dead of sun
4 0
3 years ago
Read 2 more answers
Please an urgent answer<br>will give brainliest<br>what is the definition of bucket address.​
zmey [24]
Is this technology? Let me know so I can help you!!
3 0
3 years ago
11.
dsp73
11. <span><span>their population crashed.
</span><span>
12. </span></span><span>dead zone

13. I believe </span><span>energy efficient</span>
4 0
3 years ago
Read 2 more answers
An important task that the operating system performs is ____, which keeps track of the files stored on a computer so that they c
finlep [7]
#1) An important task that the operating system performs is ____, which keeps track of the files stored on a computer so that they can be retrieved when needed.
Answer: File Management System. Keeps track of where files are stored and determines how the files are stored following the operating system file allocation policies. It uses available storage space efficiently for files and creates a record/log of all file usage. It allocates a file to a user if is free, and if they are permitted access to it. Then de-allocates file when the user is finished with it.
8 0
3 years ago
Other questions:
  • How to track flash socket server connections wireshark?
    10·1 answer
  • In a video, a motionless image is called
    7·2 answers
  • ​according to your text, digital natives tend to prefer different digital communication channels more than do digital immigrants
    5·1 answer
  • Write a program to read from std_info.txt.
    11·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • You want to calculate a bonus if the sold price was at least equal to the listing price, and if the house sold within 30 days af
    6·1 answer
  • Mississippi law codes state that bullying and cyberbullying are against the law. A court can decide to incur ___________________
    10·1 answer
  • Which user interface part shows graphical output of mined data?
    8·2 answers
  • Explain how to add cell A1 and cell B3 in excel
    10·1 answer
  • P.W. Singer jokes about how many people are using Wang computers. What point is he making with this joke?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!