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]
2 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]2 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
Which command is used to copy entire folder structures between volumes or across a network while maintaining all NTFS file permi
True [87]

Answer:

Robocopy

Explanation:

The newer and most used command to accomplish this is Robocopy. This code does exactly what is described in the question, it copies the entire structure of the volume in question but still maintains all of its permissions and attributes. It also allows you to copy large datasets at an extremely fast speed, roughly 150 MB/sec. Robocopy can even resume interrupted file transfers without loss of data.

8 0
2 years ago
Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
Inessa05 [86]
Helpful, resourceful, friendly, welcoming.
8 0
3 years ago
Read 2 more answers
You have to communicate a signal in a language that has 3 symbols A, B and C. The probability of observing A is 50% while that o
Vlada [557]

Answer:

Huffman code is use for encoding the language. The entropy when calculated is 1.5.

Explanation:

Using Huffman Coding scheme to encode:

The huffman coding scheme is described in the attachment.

To find entropy; we use the formula given below:

H = ∑p log_{2}  \frac{1}{p}

where H = Entropy and p = probability

p(A) = 50% = 1/2

p(B) = 25% = 1/4

p(C) = 25% = 1/4

H = \frac{1}{2} log_{2} 2 + \frac{1}{4}  log_{2} 4+ \frac{1}{4} log_{2}4\\H = \frac{1}{2}(1) + \frac{1}{4}(2) + \frac{1}{4}(2)\\H = \frac{1}{2} + \frac{2}{4} + \frac{2}{4}\\H = \frac{1}{2} + \frac{1}{2} + \frac{1}{2}\\H = \frac{3}{2}\\H = 1.5

Download pdf
7 0
3 years ago
Interest accumulated on the principle of a loan must also be paid. The accumulated interest is known as which of the following?
tangare [24]
I think B but idk lol
7 0
3 years ago
Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the fo
zavuch27 [327]

Answer:

D) extents

Explanation:

Disks fragmentations in computer science refers to the cases of a file system laying out its contents  in a non-continuous manner thus preventing an in-place alteration of the contents (that is the contents of the file are scattered in fragments across different location on the disk). Disk fragmentation is mostly associated with aging. To mitigate against this, modern implementation of file systems try to preallocate longer chunks of disk space, this is called extents, in this way fragmentation is avoided since a contiguous size of disk space is preallocated to the files and its contents stay together.

4 0
2 years ago
Other questions:
  • Perhaps programs used for business purposes ought to conform to higher standards of quality than games. With respect to software
    7·1 answer
  • Write a function, factors, that takes an integer n, and returns a list of values that are the positive divisors of n. Note: 0 is
    13·1 answer
  • To play game, go inside the Grand Theft Auto V folder and right click and runGTAVLauncher as administrator.If you get any missin
    5·1 answer
  • Which tab provides commands for the most commonly used elements in Word software?
    15·1 answer
  • Insurance can help you:
    12·1 answer
  • You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up th
    5·1 answer
  • Stating a document is PDF or XPS document refers to document _______​
    10·1 answer
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • Meaning and explanation of fortran​
    11·2 answers
  • What do hard disk drive use to store data
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!