Using Java Write Program Uses Method Display Random Text Based Emoji 5 Choices Decide 5 Em Q37125286

Using Java, write a program that uses a method to display arandom text-based emoji out of 5 choices (you decide which 5 emojismake up that choice).

Sample output 1: @w@

Sample output 2: T_T


Solution


public class DisplayRandomEmoji { public static void showEmoji() { double num = Math.random(); if (num <= 0.2) { System.out.println(“@w@”); } else if (num <= 0.4) {

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.