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
Which is a good example of kinetic energy
Alexandra [31]

Answer: A. Flying a paper airplane.  

5 0
3 years ago
Read 2 more answers
Lonnie has several workbooks that contain financial and sales data. He needs to ensure that if the data in a single cell in one
Rzqust [24]

Answer: Linked cell

Explanation: I just did a test

7 0
3 years ago
list the version of Windows you are using XP, Windows7, Windows8 and then explain the steps you will use to find the programs
zhannawk [14.2K]

The type of windows I am using is:Windows 8.1
7 0
3 years ago
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string
erica [24]

Answer:

C. Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

Explanation:

Byte pair encoding is a form of encoding in which the most common pairs of consecutive bytes of data are replaced by a single byte which does not occur within the set of data.

For example, if we has a string ZZaaAb, it can be encoded if the pairs of string ZZ are replaced by X and the second pair by Y. So, our data now becomes XYAb.

To get our original data, that is decode it, we just replace the data with the keys X = ZZ and Y = aa thus allowing our original data to be restored.

Since our original string is restored without loss of data, it implies that <u>byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.</u>

8 0
2 years ago
Please try and solve this
Genrish500 [490]

Answer:

Many students coming into Woodworking 108 are bewildered by “all those little marks ... Parts of an inch will be referred to in fraction form instead of its decimal equivalent. ... on divisions of 2: 1” 2= ½”. ½” 2= ¼”. ¼” 2= 1/8”. 1/8” 2= 1/16”. 1/16” 2= 1/32” ... way is to realize there are 16/16 in an inch and count back 3 of the 1/16 ...

Explanation:

4 0
3 years ago
Other questions:
  • A(n) _____________ is a simple tool that can help identify computers/devices or communication circuits that have higher-than-ave
    14·1 answer
  • A server-side extension ________________. provides its services to the web server in a way that is totally transparent to the cl
    13·1 answer
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • ​this is another name for the wireless configuration in which a central wireless device is used to serve all wireless clients.
    13·1 answer
  • A user prefers an external monitor, mouse, and keyboard for a laptop. The user does not want to use the built-in screen; however
    5·1 answer
  • Another name for a computer's operating system
    9·2 answers
  • This morning when Paul turned on his computer at work, it would not boot. Instead, Paul reported that he heard a loud clicking n
    6·1 answer
  • Henry conducted a survey on an ad done by his company. In the survey, he asked people to evaluate the ad and state whether they
    8·1 answer
  • Can someone let me join your kingdom if anybody knows this game and plays it as well. ​
    13·1 answer
  • All organizations need good quality cybersecurity to ensure _____. Select 4 options.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!