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
zimovet [89]
3 years ago
9

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:
zaharov [31]3 years ago
5 0

Answer:

// program in java.

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 name

System.out.print("Enter Your name: ");

 // read name from user

String NAME=scr.nextLine();

// print message

System.out.println("Greetings,"+NAME);

     

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read name from user with the help of scanner object and assign it to variable "NAME".Then print a Greetings message as "Greetings,NAME" where NAME will be  replaced with user's input name.

Output:

Enter Your name: Rachel                                                                                                    

Greetings,Rachel

You might be interested in
Connect research concepts to their definitions
stellarik [79]
Answer Research is defined as the creation of new knowledge and/or the use of existing knowledge in a new and creative way so as to generate new concepts, methodologies and understandings
8 0
2 years ago
Select the answer that best describes the ethical guideline followed in each scenario.
Montano1993 [528]
We need the scenario to solve this feel free to comment on this with your so scenarios and I will provide you with answers or just post another question
4 0
3 years ago
After successfully building a machine language version of thePascal compiler, one could in principle discard the P-code interpre
MA_775_DIABLO [31]

Answer:

Pascal is a high-level programming language, and anyone can decide to write a machine language compiler with it, If Pascal language specifications get to change or somewhere in the code a bug is discovered, it will be easier to build the machine language compiler again from the Pascal code version than deciding to modify the machine language.

Explanation:

6 0
3 years ago
problemas demográficos o movilizaciones que se generaron a lo largo de la historia de Honduras debido a la explotación minera​
BabaBlast [244]

Answer:

Explanation:“Se realizaron varios estudios y confirmamos que la actividad minera ha provocado graves problemas dermatológicos y de la vista, caída del pelo, partos prematuros, malformaciones congénitas y abortos. También se detectaron niveles altísimos de metales pesados en la sangre de las personas.

7 0
3 years ago
How to instal and complie java in windows?
Paladinen [302]
Go to www.oracle.com , the Downloads tab, find Java, probably SE (Standard Edition) and then select the appropriate SDK (Software Development Kit).

I don't remember if you need to use an absolute (full) path to javac on Windows, but the command is something like:

javac yourProgram

yourProgram needs to be named yourProgram.java
4 0
3 years ago
Other questions:
  • Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, pr
    5·2 answers
  • The danger in using soy solvents is that they: A) Are not approved by the FDA B) Take paint off of surfaces where used C) Are no
    11·2 answers
  • An unauthorized user is a network _______ issue.
    11·1 answer
  • What are layers? Why would a layer be used?
    9·1 answer
  • What do you understand by Multiprotocol Label Switching, how it works and is helpful in today's network scenario.
    15·1 answer
  • Why do you lose internet access when you alter the arp to a static address?
    12·2 answers
  • Some of the ways we can resolve IPv4 address shortage
    15·1 answer
  • ______________ memory is a small, high-speed, high-cost memory that servers as a buffer for frequently accessed data
    9·2 answers
  • Ứng dụng 1 số phần mềm cho quá trình kiểm tra đánh giá
    7·1 answer
  • Which of these is an example of an online workspace?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!