Assume that word is a String variable. Write a statement to display the message "Today's Word-Of-The-Day is: " followed by the value of word. The message and the value of word should appear together, on a single line on standard output.

Respuesta :

Answer:

// variables declaration and initialization

String word="Monday";

// print statement

 System.out.println("Today's Word-Of-The-Day is:"+word);

Explanation:

Declare and initialize a String variable "Word" with "Monday". Then print a  message "Today's Word-Of-The-Day is:" followed by the value of "Word" with  the help of "+" operator.This will print the whole message in a single line.

//Here is implementation 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{    

      // variables

     String word="Monday";

     System.out.println("Today's Word-Of-The-Day is:"+word);    

   }catch(Exception ex){

       return;}

}}

Output:

Today's Word-Of-The-Day is:Monday

ACCESS MORE