Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
377 B
1
Indexable
Never
public class Main {
    public static void main(String[] args) {
        String input = "Hello";
        printRowWiseWithAsterisk(input);
    }

    public static void printRowWiseWithAsterisk(String input) {
        for (int i = 0; i < input.length(); i++) {
            char currentChar = input.charAt(i);
            System.out.println(currentChar + "*");
        }
    }
}
Leave a Comment