public class Initials { public static void main(String[] args) { // Add a first name and a last name: String firstName = "Cash"; String lastName = "Carti"; // What are the initials? System.out.println(firstName.charAt(0)); System.out.println(lastName.charAt(0)); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter