Iterator + ArrayList import java.util.ArrayList; import java.util.Iterator; public class JavaTest { public static void main(String[] args) { ArrayList arrStr = new ArrayList(); arrStr.add("James Kim"); arrStr.add("Kevin Jang"); arrStr.add("Jason Park"); Iterator iterator = arrStr.iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); } } }
import java.util.HashSet; import java.util.Iterator; public class JavaTest { public static void main(String[] args) { HashSet set = new HashSet(); set.add(3); set.add(2); set.add(1); set.add(2); set.add(2); set.add(2); Iterator iterator = set.iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); } } } 중복되는 값은 허용하지 않음. 자동 정렬이 돼서 출력됨. 원래 TreeSet 이 자동 정렬되는데 HashSet 도 자동 정렬되네..
Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK activity_main.xml activity_sub.xml SubActivity.java package com.jwsoft.javaproject; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class SubActivity extends AppCompatActivity { private Button btnSub; @Override p..
activity_main.xml MainActivity.java package com.jwsoft.javaproject; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity { private Button btnShowKeyboar..
import java.util.Scanner; public class JavaTest { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); String name = scanner.nextLine(); int age = Integer.parseInt(scanner.nextLine()); System.out.println("name: " + name); System.out.print("age: " + age); } } import java.util.Scanner; public class JavaTest { public static void main(String args[]) { Scanner scanner = ..
- Total
- Today
- Yesterday
- XML
- ArrayList
- Android
- JSONArray
- ViewModel
- 코틀린
- fragment
- Intent
- Architecture Pattern
- James Kim
- View
- CoordinatorLayout
- Livedata
- MVVM
- activity
- handler
- 안드로이드 #코틀린 #Android #Kotlin
- recyclerview
- Design Pattern
- Vue.js #Vue.js + javascript
- 자바
- 혀가 길지 않은 개발자
- TabLayout
- Kotlin
- ViewPager2
- 안드로이드
- DataBinding
- java
- coroutine
- JSONObject
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |