charAt()

PHOTO EMBED

Sun Nov 06 2022 03:38:28 GMT+0000 (Coordinated Universal Time)

Saved by @cruz #javascript

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));
  }
  
}
content_copyCOPY