Answer:
import java.util.Scanner;
public class TestClock {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
System.out.print("Enter favorite color:");
String word1 = in.next();
System.out.print("Enter pet's name:");
String word2 = in.next();
System.out.print("Enter a number:");
int num = in.nextInt();
System.out.println("you entered: "+word1+" "+word2+" "+num);
}
}
Explanation:
Using Java Programming language
- Import the Scanner class
- create an object of the scanner class
- Prompt user to enter the values for the variables (word1, word2, num)
- Use String concatenation in System.out.println to display the output as required by the question.
The OS shell allows access to the operating system services
Answer:Event action
Explanation:Event-handling mechanism is the technique through which the the management of any event is Java is controlled and coordinated. The event handler code is used for the managing of the mechanism and execution.
Event action is not a part of the event handling mechanism in the java because no such step comes under the code of event handler and rest other option are present in java event handler.