본문 바로가기

전체 글

(144)
21.11.5 金 (Array 요소 출력하기) String[] helloWorld = {"Hello", "World"}; System.out.println(helloWorld); System.out.println(Arrays.toString(helloWorld)); output [Ljava.lang.String;@45a877 [Hello, World] (한 줄의 여러 값 한 번에 입력하기) String input = scanner.nextLine(); // get the entire line after the prompt String[] numbers = input.split(" "); // split by spaces (변수 타입 판독) var.getClass() 조건문에서 String 변수 간의 상등을 표현할 때 ==..
별찍기 로직 정리 package Week01; import java.util.Scanner; public class BJ1000 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); for (int i = 0; i < N; i++) { for (int j = 0; j
(Java)cannot resolve symbol 'println' println() 메서드가 메인 메서드 안에서 호출이 돼야한다!
21.11.1 月 print와 println의 차이: print의 경우 출력을 하고 커서를 다음 행으로 옮기지 않지만 println의 경우 출력 후 커서를 다음 행으로 옮긴다.
README Github: https://github.com/ GitHub: Where the world builds software GitHub is where over 73 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat... github.com velog: https://velog.io/@jmk05099 jmk05099 (정민기) - velog velog.io 이 블로그의 목적은 '전시'가 아니라 '기록'에 있습니다. Velog의 경우 전시의 목적이 어..
코드업 100제 6096번 바둑알 뒤집기 문제 2차원 배열에서 숫자값이 int형으로 저장돼있는지 string형으로 저장돼있는지 명확하게 구분해야 한다. 이 문제의 경우 for문으로 2차원 배열을 입력하지 않고 input()을 통해 입력하기 때문에 숫자가 string형으로 리스트에 저장된다. 따라서 0을 1으로 바꾸고 1을 0으로 바꾸는 코드 블럭에서 0과 1을 string형으로 다뤄야 한다.
21.10.24 range() function range(start, stop, step) start: 선택. 어떤 정수에서 시작할지를 결정. 기본값은 0. stop: 필수. 어떤 정수에서 끝날지 결정. 기입된 정수는 포함되지 않음. step: 선택. 얼만큼 증감할지를 결정. 기본값은 1.
(Python)IndexError: list index out of range 리스트에서 특정 인덱스에 해당하는 값을 불러오려고 하는데 그 값이 없을 때 발생한다.