If I have a string like "lollipop", how can I make a loop that prints it out as:
int x = 0;
String word = "lollipop";
while (x < word.length())
x += 1;
how can I make a loop that prints it out ...
That is the point of your exercise. You need to work that out for yourself.
Would using arrays be necessary? Is there a way to do it without using arrays?
No, and Yes.
That is the wrong approach. You cannot treat a String as an array.
Big Hint: look at the
substring method(s) in
String javadocs. Here's the link to the javadoc: http://docs.oracle.com/javase/8/docs/api/java/lang/String.html