Как использовать символ в переключателе? Я буду получать первую букву того, что вводит пользователь.
import javax.swing.*;
public class SwitCase {
public static void main (String[] args){
String hello="";
hello=JOptionPane.showInputDialog("Input a letter: ");
char hi=hello;
switch(hi){
case 'a': System.out.println("a");
}
}
}