Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class string {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.println("Enter a string:");
- String input = scanner.nextLine();
- scanner.close();
- for (int i = 0; i < input.length(); i++) {
- char c = Character.toUpperCase(input.charAt(i));
- System.out.println(c);
- try {
- Thread.sleep(1000); // Delay of one second
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement