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
Hardware failure, power outages, and DOS attacks will affect:
const2013 [10]

Answer:

The answer should be data availability

6 0
3 years ago
897,100 rounded to the nearest hundred thousand is
dmitriy555 [2]

The answer would be 900,100 because the hundred thousand is the 8 and since the number next to the 8 is a nine, the 8 is rounded up

7 0
3 years ago
What does this comparison block indicate?
natima [27]

Answer:

This comparison block indicates that the comparison is true if the left side is equal to the right side.

Explanation:

The comparison uses the = operator, which is the assignment operator in most programming languages. This operator is used to assign a value to a variable. In this case, the comparison is checking whether the value of the getItem variable is equal to 5. If the value of getItem is equal to 5, then the comparison will evaluate to true. If the value of getItem is not equal to 5, then the comparison will evaluate to false.

5 0
1 year ago
Workers in a child care facility or preschool are part of what career path?
dedylja [7]

Answer:

A

Explanation:

Preschool teachers show education

8 0
3 years ago
Read 2 more answers
What are examples of macro events related to a form? Check all that apply.
Westkost [7]

Answer:

A form is closed

A form is resized.

A form is opened

A user presses a key

A user moves the mouse

Explanation:

There are different events in a form, and we can use them in different situations like:

  • We can use On Resize to resize our form.
  • If we On Load the form will be displayed.
  • On Clicked, If there was a click in an object
  • On Unload to close the form.
  • On Mouse Enter and On Mouse Leave, in this case, the mouse enters or leaves the object.

6 0
4 years ago
Other questions:
  • The length of time the valve is open, expressed in degrees of crankshaft rotation, is called camshaft A. overlap.B. lobe separat
    6·1 answer
  • Charges of the opposite tend to repel each other.
    9·2 answers
  • Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
    8·1 answer
  • What is the full form of PDP​
    7·1 answer
  • What does the word “Gacha” come from??????
    5·2 answers
  • What effect does the interconnectedness of modern media have on society?
    14·2 answers
  • How to wire two separate switches & lights using the same power source?
    14·1 answer
  • Which types of online reading tools are available within the CloseReader? Check all that apply.
    11·1 answer
  • What is a variable in programming?
    10·1 answer
  • A new thread begins its life cycle by transitioning to the ________ state. Group of answer choices new runnable waiting terminat
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!