I'm trying to learn how to program in Java. I was playing with loops and made this niftty thing that I would attempt to use if my teacher forced me to write lines. First I'd have to beg the teacher to let me type them for educational purposes...
LinesLoop.java
Code:public class LinesLoop { void printLines() { for (int i = 1; i < 1001; ++i) System.out.println(i + ". I will write all my lines. With numbers even."); } public static void main(String[] args) { LinesLoop a = new LinesLoop(); a.printLines(); } }





Reply With Quote

Bookmarks