Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class CharsToString {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- char first = scanner.nextLine().charAt(0);
- char second = scanner.nextLine().charAt(0);
- char third = scanner.nextLine().charAt(0);
- System.out.printf("%c%c%c", first, second, third);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment