java iterative processing

Today I will write about iterative processing of java.

What is a repetitive sentence?

A process that repeats an instruction given a certain instruction

When the execution result is output like this

[1] [2] [3] [4] [5]

Normally

Normal processing


 public class PrintFiveStars { |
      public static void main (String[] args){ |
          System.out.println("[1]"); 
          System.out.println("[2]"); 
          System.out.println("[3]"); 
          System.out.println("[4]"); 
          System.out.println("[5]"); 
      } 
 } 

When using iterative syntax It only takes about 5 lines. If you apply this, 100 or 1000 lines You can do the processing just by editing.

Iterative processing



public class Print100Stars {
    public static void main (String[] args) {
     int sum = 0;
     for (int i = 1; i <= 5; i++){
          sum += 1;
          System.out.println(sum);
      }
  }
}

Recommended Posts

java iterative processing
Iterative processing
Java thread processing
Java string processing
Ruby Iterative Processing
[Java] Multi-thread processing
[Java] Stream processing
[Java ~ Conditional branching / Iterative processing ~] Study memo (3)
JAVA constructor call processing
Java random, various processing
[Java] Multi-thread processing --Exclusive control
Java
[Java] Stream API --Stream termination processing
[Java] Stream API --Stream intermediate processing
☾ Java / Iterative statement and iterative control statement
Measured parallel processing in Java
Understanding Java Concurrent Processing (Introduction)
Java
Summary of java error processing
[Ruby ~ Iterative processing ~] Study memo 4
Date processing in Java (LocalDate: Initialization)
[Swift] "for-in statement" about iterative processing
Memorandum (other conditional bifurcation, iterative processing)
Delegate some Java processing to JavaScript
[Java] Loop processing and multiplication table
Memorandum (Ruby: Basic grammar: Iterative processing)
Basic processing flow of java Stream
About file copy processing in Java
Notes on Android (java) thread processing
Deleting files using recursive processing [Java]
[Java] Processing time measurement method memo
[Java] Exception types and basic processing
Studying Java ―― 3
[Java] array
Java protected
[Java] Annotation
[Ruby / Refactoring] From Ruby iterative processing like Java and C language to Ruby-like iterative processing
[Java] Module
Java array
Studying Java ―― 9
Java scratch scratch
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
Data processing using stream API from Java 8
java (override)
java (method)
Java Day 2018
Java string
[Processing x Java] Construction of development environment
java (array)
Java static
Java serialization
java beginner 4
JAVA paid
Studying Java ―― 4
java shellsort
[Java] compareTo