I want to write a short program using loop. I wrote one but it doesn’t working. I’m learning loops so it’s hard to find my mistakes. Here’s my code. Please define and correct where I made a mistake.
Code:
class Ce { public static void main(String[] args) { String tence = "I can use loops."; int count = 0; while (count++ <= 25000) { System.out.println(tence); break; } System.out.println("\nI wrote sentence " + count + " times."); System.out.println("I'm learning my lesson."); } }
Comment