I'm prompting the user to enter their first and last name but I can't figure out how to show just their first and last initials
import javax.swing.*;
//import java.awt.*;
public class Lab2Program2 {
public static void main (String [] args) {
String firstName;
String lastName;
firstName = JOptionPane.showInputDialog(null, "What is your first name?");
lastName = JOptionPane.showInputDialog(null, "What is your last name?");
JOptionPane.showMessageDialog(null, " Your initials are " +
firstName + " " + lastName);
}
}