Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DJName
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner(System.in);
- System.out.println("What is your first Name?");
- String firstName = scan.nextLine();
- String firstNamePrint = String.substring(0, firstName.length() / 2);
- System.out.println("What is your last Name?");
- String lastName = scan.nextLine();
- String lastNamePrint = lastName.substring(lastName.length() / 2, lastName.length());
- System.out.println("Your DJ Name is: " + firstNamePrint + lastNamePrint + "izzle");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment