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
Identify the causes of configuration problems. (choose all that apply)
jolli1 [7]

Answer: The computer does not meet minimum requirements of the software program because too much energy gets put in it

Explanation:

Good luck

4 0
3 years ago
Read 2 more answers
Which step should Rupa take?
PilotLPTM [1.2K]

Complete Question:

Rupa would like to quickly insert a table into her document without having to worry about formatting the data in the table. Which step should Rupa take?

Group of answer choices.

A. Insert tab, Tables group, Draw Table option

B. Insert tab, Tables group, Insert Table option

C. Insert tab, Tables group, Quick Tables option

D. none of the above

Answer:

C. Insert tab, Tables group, Quick Tables option

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Microsoft Word 2019, the users are availed with the ability to edit the word document in the following view type;

I. View Mode.

II. Print Mode.

III. Drift Layout.

Quick tables refers to the pre-formatted or pre-created stored in building blocks galleries that are easily accessible to the end users at any time.

In this scenario, Rupa would like to quickly insert a table into her document without having to worry about formatting the data in the table. The steps which Rupa should take are click on Insert tab, Tables group and then select the Quick Tables option.

6 0
2 years ago
List and describe 3 parts (often referred to as 'elements') of a web page?
Art [367]

Answer:

Content

Design

Development

Explanation:

The design and management of sites is internet explorer; it is the research that takes place over time to make a site look fantastic, work quickly and function well with a smooth user interface.

7 0
3 years ago
. Create an abstract Dollar class with two integer attributes, both of which are non-public (Python programmers - it is understo
aksik [14]

Answer:

Explanation:

The following code is written in Java. It creates the abstract dollar class that has two instance variables for the dollars and the coins that are passed as arguments. The test output can be seen in the picture attached below.

class Dollar {

   int dollars;

   double coin;

   private Dollar(int dollar, int coin) {

       this.dollars = dollar;

       this.coin = Double.valueOf(coin) / 100;

   }

   

}

4 0
2 years ago
Ben wants to create a Book class that has an instance variable serialNumber. Where should he declare the instance variable
MrMuchimi

Answer:

within the Book class but needs to also be outside of any methods.

Explanation:

If Ben is creating an entire Book class then the instance variable needs to be within the Book class but needs to also be outside of any methods. If Ben places the variable inside a method it can only be used by that method and therefore becomes an instance variable of that method and not the class. By creating it inside the class and outside the methods it can be used every single time a Book object is created. Therefore, creating an instance variable of serialNumber every time.

4 0
3 years ago
Other questions:
  • Fill in the blank - A generation of social-oriented, physical games such as the _______ Wii console, emerged in the late 2000s,
    15·1 answer
  • What does the acronym GIF stand for? Graphics Interface Format Graphics Interchange Format Going Into Files Gathering Informatio
    12·2 answers
  • Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11.
    14·1 answer
  • If the list above is named list1 and is implemented as a list, whatstatement would you use to find the number ofelements?list1.s
    9·1 answer
  • Add a new row to a table by clicking in the
    10·1 answer
  • What will be displayed after code corresponding to the following pseudocode is run? Main Set OldPrice = 100 Set SalePrice = 70 C
    10·1 answer
  • Select the correct answer.
    10·1 answer
  • Complete the following sentence.
    7·1 answer
  • Your computer is taking longer than usual to open files and you notice that your hard drive light stays on longer than usual whi
    9·1 answer
  • What is a form of technology that you think will make your life easier?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!