Java Write Switch Statement Checks Origletter Print Alpha B B Print Beta Character Print Q37079673

In Java Write a switch statement that checks origLetter. If ‘a’or ‘A’, print “Alpha”. If ‘b’ or ‘B’, print “Beta”. For any othercharacter, print “Unknown”. Use fall-through as appropriate. Endwith newline.

import java.util.Scanner;

public class ConvertToGreek {
   public static void main (String [] args) {
      char origLetter;

      origLetter = ‘a’;

      /* Your solution goes here */

   }
}


Solution


import java.util.Scanner;public class ConvertToGreek { public static void main(String args[]){ char origLetter; origLetter = ‘a’;

OR
OR

Leave a Comment

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