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
andriy [413]
3 years ago
5

Write a program that prompts the user for a name (any String value would work for testing), and print a hello message to the con

sole with the input string after hello. (if the user typed 'class' then the console will display 'Hello class').
Computers and Technology
1 answer:
Slav-nsk [51]3 years ago
4 0

Answer:

// program in Java.

// package

import java.util.*;

// class definition

class Main

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read input

Scanner scr=new Scanner(System.in);

 // ask to enter the name

System.out.print("Enter a name:");

 // read name

String name=scr.nextLine();

 // print the hello message

System.out.println("Hello "+name);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create a Scanner object to read name from user.Read name from user and assign it to variable "name".Then print the message Hello followed by the name.

Output:

Enter a name:Sam

Hello Sam

You might be interested in
If you said the bottom margin, you are talking about what?
user100 [1]
The space between the words and the edge of the paper
3 0
3 years ago
Read 2 more answers
When a cardholder successfully contests a charge, the acquiring bank must retrieve the money it placed in the merchant account i
lions [1.4K]

Answer:

Charge back.

Explanation:

A chargeback is a charge that is returned to a payment card after a customer successfully disputes an item on their account transactions report. Simply put, it is the reversal of a credit card payment that comes directly from the bank.

Most commonly the payer is a consumer.

A chargeback may occur on bank accounts or credit cards. They can be granted to a cardholder for a variety of reasons. A chargeback can be considered a refund since it returns specified funds taken from an account through a prior purchase. Chargebacks are focused on charges that have been fully processed and settled. Chargebacks can often take several days for full settlement as they must be reversed through an electronic process involving multiple entities.

The chargeback is ordered by the bank that issued the consumer's payment card.

6 0
3 years ago
It is very easy to change data into charts<br> what is a Microsoft Excel Microsoft Outlook or both​
Vadim26 [7]
It’s microsoft Excel
8 0
3 years ago
How do you know a resource is credible
Alisiya [41]

Answer:

There are several main criteria for determining whether a source is reliable or not.

1) Accuracy. Verify the information you already know against the information found in the source

2) Authority. Make sure the source is written by a trustworthy author and/or institution

3) Currency

4) Coverage

Explanation:

5 0
3 years ago
Always adjust mirrors after adjusting your seat.<br> a. True<br> b. False
almond37 [142]
<span>True - it's important to always adjust mirrors after adjusting the position of your seat in the car when driving. This is essential to ensure you have a good view of the road and are able to spot possible hazards and park correctly.</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • How do you calculate the total voltage in a series circuit with more than one component?
    13·2 answers
  • What are the four basic operating principles of the information processing cycle?
    7·2 answers
  • All objects in an object-oriented program are instantiated (created) from a ____.
    12·1 answer
  • Which statement accurately compares the Restart at 1 and Continue Numbering features of Word?
    13·2 answers
  • ???????????????????????​
    10·1 answer
  • Which of the following enables robots to do things such as understand itself, walk, talk, and develop skills?
    15·1 answer
  • How many questions do you have to answer before you can use direct messages on Brainly?
    13·2 answers
  • Hlo Brainlians !!
    11·2 answers
  • A__ is a part of a GUI that allows a specific type of interaction with the user.
    14·1 answer
  • What dod instruction implements the dod cui program
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!