Untitled

 avatar
unknown
plain_text
a year ago
377 B
5
Indexable
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 + "*");
        }
    }
}
Editor is loading...
Leave a Comment