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
Novosadov [1.4K]
3 years ago
6

Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia"). Assume also that stdin is a v

ariable that references a Scanner object associated with standard input. Write some code that reads a value into name then prints the message "Greetings, NAME" on a line by itself, where NAME is replaced the value that was read into name. For example, if your code read in "Rachel" it would print out "Greetings, Rachel" on a line by itself.
Computers and Technology
1 answer:
yarga [219]3 years ago
8 0

Answer:

String name = stdin.nextLine();

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

Explanation:

See a complete java program below

import java.util.Scanner;

public class num7 {

   public static void main(String[] args) {

     Scanner stdin = new Scanner(System.in);

       System.out.println("Enter a name");

       String name = stdin.nextLine();

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

   }

}

You might be interested in
It’s safe to download files from the internet is you preform regular windows security updates; that is all you need to protect y
Goryan [66]
False if the user downloads files before scanning them with anti virus software anything bad can happen
7 0
4 years ago
Read 2 more answers
How much memory is reserved for a function template?
emmasim [6.3K]
None by default, instructions for the function are only generated by the compiler if such a function is actually called in any one possible control path
7 0
3 years ago
Consider the following C code: double balance; try { cout << "Enter the balance: "; cin >> balance; cout << en
qaws [65]

Answer:

Answer given below

Explanation:

Program:

1. double balance;

2. try{

3. cout<<"Enter the balance :";

4. cin >> balance;

5. cout<<endl;

6. if(balance < 1000.00)

7. throw balance;

8. cout<<"Leaving the try block."<<endl;

9. }

10. catch(double x){

11. cout<<" Current balance : "<<x<<endl<<"Balance must be greater than 1000.00"<<endl;;

12. }

Answer A:

If we consider the above program lines, try block represents from 2 to 9 lines.

Answer B:

If we consider the above program lines, catch block represents from 10 to 12 lines.

Answer C:

catch block parameter is x and its type is double.

Answer D:

If we consider the above program lines, line number 7 indicates throw statement.

8 0
4 years ago
What happens if you select exit on the file menu
fomenos

Answer:

The existing window closes.

Explanation:

The exit button is used to close the interface or window the computer user is on at the time.

5 0
3 years ago
Business intelligence applications access large pools of data, usually transactional records stored in large databases called __
asambeis [7]
Business intelligence applications access large pools of data, usually transactional records stored in large databases called data warehouses (DW or DWH). The data warehouse contains <span>integrated </span>data from one or more disparate sources that is <span>used for reporting and data analysis.</span>
8 0
4 years ago
Other questions:
  • If you save a Word file as a Web page, what type of file will it be?
    12·1 answer
  • Please help me!! 10 Points are waiting!!
    8·1 answer
  • Your company shares a building with a competitor's branch office. Recently, you noticed that some computers other than company c
    14·1 answer
  • . Which of the following is the correct syntax for a method header with parameters? a. public static void example(x, y) { b. pub
    8·1 answer
  • Use the_____icon to insert a new record.<br><br> A. *<br> B. X<br> C. =<br> D. &amp;
    11·1 answer
  • Write a complete program in Assembly Language: 1. Promts the user to enter 10 numbers. 2. saves those numbers in a 32 bit intege
    15·2 answers
  • the guest would like to convert his 100 dollar to peso.How much will the guest receive if the exchange rate is 1 dollar=Php 50.5
    11·2 answers
  • The purpose of data analysis is to filter the data so that only the important data is viewed.
    7·1 answer
  • 1. Trình bày các mô hình mối đe dọa trong hệ thống viễn thông
    11·1 answer
  • Read each of the following statements about Computer Science and explain why you think that statement is true.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!