Projects/자바 100제 (6) 썸네일형 리스트형 자바 100제 12번 scanner nextline package java_algorithm; import java.util.Scanner; public class ex100_12 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); String word = scan.nextLine(); System.out.println(word); } } 자바 100제 11번 scanner nextline 응용 package java_algorithm; import java.util.Scanner; public class ex100_11 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String cha01 = sc.nextLine(); String cha02 = sc.nextLine(); System.out.println(cha02 + "" + cha01); } } 자바 100제 10번 scanner nextInt 응용 package java_algorithm; import java.util.Scanner; public class ex100_10 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int i = sc.nextInt(); int e = sc.nextInt(); System.out.println(i + "" + e); } } 자바 100제 9번 scanner nextdouble package java_algorithm; import java.util.Scanner; public class ex100_9 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); double i = scan.nextDouble(); System.out.println(i); } } 자바 100제 8번 scanner nextLine package java_algorithm; import java.util.Scanner; public class ex100_8 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String i = sc.nextLine(); System.out.println(i); } } 자바 100제 7번 문제 스캐너 // ex100_7.java package java_algorithm; import java.util.Scanner; public class ex100_7 { public static void main(String[] args) { // TODO Auto-generated method stub // 스캐닝(system.in)으로 작동하는 스캐너 객체 생성 Scanner sc = new Scanner(System.in); // int i 변수에 다음에 적히는 nextint()정수를 담는다. int i = sc.nextInt(); System.out.println(i); } } 이전 1 다음