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
Effectus [21]
2 years ago
15

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

the console with the input string after hello. (if the user typed 'class' then the console will display 'Hello class').
Computers and Technology
1 answer:
BabaBlast [244]2 years ago
7 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 "y_name".Then print the message Hello followed by the name.

Output:

Enter your name:Krish                                                                                                      

Hello Krish

You might be interested in
How does 5G technology enhance the Internet of Things (ioT) ?
Naddik [55]

Answer:

Internet of Things are everyday items that uses the internet, 5G internet enhances the internet service allowing you to connect, receive, or send information in places where internet would usually be slower like crowded areas. Through antennas using spectrum which carries information through different types of waves, it overall makes the internet service better, making the appliances on that internet service faster.

Explanation:

Internet of Things are basically any everyday item that has software that connects to the internet, in which that item sends or even receives data from it connecting to different servers using an internet service.

5G is a 5th generation technology that also connects to servers through an internet service. This 5G technology allows the items to receive information faster, which overall approves the internet service. One of the proud examples of 5G technology is our modern-day phones/appliances. 5G technology allows you to connect to an internet service and send information or receive information faster than 4G technology.

For your answer, since "internet of things are everyday items that uses the internet, 5G internet enhances the internet service allowing you to connect, receive, or send information in places where internet would usually be slower like crowded areas. Through antennas using spectrum which carries information through different types of waves, it overall makes the internet service better, making the appliances on that internet service faster."

Hope this helps.

4 0
2 years ago
What will be the results of executing the following statements? x.setEditable(true); x.setText("Tiny Tim"); a. The text field x
maxonik [38]

Answer:

Option B: The text field x will have the value "Tiny Tim" and the user will be able to change its value.

Explanation:

  • The first statement say:  x.setEditable(true);

It will only change the property of the text present in x to editable. This means that whenever the text value needs to change the user can edit it.

  • The second statement say:   x.setText("Tiny Tim");

It will put the text "Tiny Tim" into the attribute x and present it as the output or result.

6 0
3 years ago
Which of the example DFSs discussed in this chapter would handle a large, multiclient database application most efficiently? Exp
Tju [1.3M]

Answer: A.F.S- known as Andrew File System.

Explanation:

This is a distributed network file system created to handle large multiclient database. It support Information sharing on a large scale by reducing client-server communication.

3 0
3 years ago
Sarah wants to calculate how much of a profit she would make on producing and selling a new product. Sarah should use a _____.
vagabundo [1.1K]
The answer is spreadsheet. I just did this lesson and I got all of the answers right so I know it's correct.
4 0
3 years ago
When data are entered into a form and saved, they are placed in the underlying database as knowledge?
luda_lava [24]
The answer would be and is true.
7 0
3 years ago
Other questions:
  • HELP NOW PLZZ/ Question: Complete the sentence with the correct response.
    11·1 answer
  • True or False: clicking ads and pop-ups like the one below could expose your computer to malware.
    11·2 answers
  • #Write a function called string_finder. string_finder should #take two parameters: a target string and a search string. #The fun
    14·1 answer
  • Discuss trends in cellular data transmission speeds
    15·2 answers
  • _____________________ denotes the use of human interactions to gain any kind of desired access. Most often, this term involves e
    11·1 answer
  • What is one pass of a coding sequence called?​
    13·2 answers
  • Pls answer i need to turn it in today!!
    15·1 answer
  • Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)
    9·1 answer
  • 5 differences between a regular mouse and a gaming mouse​
    14·1 answer
  • Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!