Notice
Recent Posts
Tags
- verilog
- dataflow modeling
- interface
- LED
- java
- Recursion
- ctc mode
- normal mode
- interrupt
- behavior modeling
- atmega 128a
- Comparator
- atmega 128
- gpio
- Algorithm
- ATMEGA128A
- behavioral modeling
- 4bit parallel adder
- half adder
- sequential logic circuit
- fast pwm mode
- 8bit timer/counter
- MUX
- Set
- Method
- timer / counter
- full adder
- structural modeling
- Linked List
- structure
목록for each (1)
거북이처럼 천천히
Java - for each 문
for each 의 구조 for each 의 기본 구조는 다음과 같다. for (type var: iterate) { body-of-loop } String[] numbers = {"one", "two", "three"}; for(String number : numbers) { System.out.println(number); } 여기서 iterate은 루프를 돌릴 객체를 의미하고, var은 객체를 구성하는 원소를 의미한다. 즉, iterate 객체에서 하나씩 원소를 뽑아 var 변수에 대입하고, for문을 수행한다. 이는 파이썬(pythob)의 for-in 문과 동일한 역활을 수행한다. 단, for each 문은 따로 반복회수를 명시적으로 주는 것이 불가능하고, 1스탭씩 순차적으로 반복될때만 사용가능하..
Back-end/Java 개념
2022. 6. 12. 22:07