ALGORITHM(4)
-
[기초-출력]6003.출력하기03
print("Hello") # Hello print("World") # World print("Hello\nWorld") # Hello # World 줄을 바꿔 출력하기 1. 기본 print()를 이용해 출력하면 문장을 출력한 후 마지막에 줄을 바꾼다. (new line) 2. 출력 후 줄을 바꾸는 대신 \n을 이용하여 줄바꿈을 할 수도 있다.
2023.07.07 -
[기초-출력]6002.출력하기02
print("문장1 문장2") # 문장1 문장2 print("문장1, 문장2") # 문장1 문장2 단어와 단어 사이에 스페이스키로 공백을 만드나 쉼표를 찍으나 같은 결과를 출력한다.
2023.07.07 -
[입출력과 사칙연산]1000.A+B 2023.07.04
-
[입출력과 사칙연산]2557.Hello World
자바 출력 방법에 대해 알아보자. 1. System 클래스의 표준 입출력 2. BufferedWriter 3. StringBuilder 4. StringBuffer 참고로 백준 문제 풀 때 자바 클래스명은 Main이어야 한다. 1. System 클래스의 표준 입출력 public class Main { public static void main(String[] args) { System.out.print("Hello World"); } } 2. BufferedWriter 3. StringBuilder 4. StringBuffer
2023.07.04