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]
3 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]3 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
0111101101010110101110110001001011101001011101101010101010110101
rodikova [14]

Answer:

binary digits in computer system it belongs

4 0
3 years ago
When installing a Windows 10 an already installed Windows 7 what happen​
astra-53 [7]

Answer:

are u updating it? or u r rooting it?

4 0
3 years ago
Read 2 more answers
In which area of the screen can features and functions of Word be accessed?
abruzzese [7]

Answer:

Toolbar

Explanation:

j don't know if you meant that instead of scroll bar, but tool bar is the answer

5 0
2 years ago
The range of an area where users can access the Internet via high frequency radio signals transmitting an Internet signal from a
Alexandra [31]
A) hotspot
Bluetooth is for short distance and pan is Personal area networks (PANs) connect an individual's personal devices
8 0
3 years ago
Read 2 more answers
What is percent encoding and why is it used?
ehidna [41]

Answer:

 Percent encoding is the mechanism for encoding the information in the URI  (Uniform resource identifier) that basically transmitted the special variable or characters in the URI to the cloud platform.

It is also used in various application for transferring the data by using the HTTP requests.

Percent encoding is also known as uniform resource locator (URL) encoding. The percent encoding basically used to convert the non ASCII characters into URL format which is basically understandable to the all the web server and browsers. In percent encoding the percent sign is known as escape character.

7 0
3 years ago
Other questions:
  • 2. What are the pros and cons of Toyota structure?
    13·1 answer
  • A_____refers to the entire Excel file
    14·1 answer
  • Word Online works exact same as the downloaded Office 2016 version.<br>True<br>False​
    7·1 answer
  • A technician is dispatch to troubleshoot a user's computer.
    12·1 answer
  • Which of the following attributes of a website indicates a more reliable source for information?
    8·1 answer
  • What year did buck tooth bob become famous
    11·2 answers
  • What is the value of variable num after the following code segment is executed?
    5·1 answer
  • Why is the cost of a software project not directly related to the cost of development?
    13·1 answer
  • What are the disadvantages of using pointers?
    6·1 answer
  • Ryan is working on a document with many secotions. For each section,he wantes to have the title bolded,underlined,an blue. Which
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!