java

시험

쩨이1 2024. 6. 21. 07:09

이진 파일을 읽거나 쓸 때는 FileInputStream, FileOutputStream

텍스트 파일을 읽거나 쓸 때는 FileReader, FileWriter

 

// 임의의 세 개의 나라 선택 (중복 선택 가능)

for (int i = 0; i < 3; i++) {

selected[i] = country[rand.nextInt(country.length)]; }