# 프로필 만들기 ## 문제 기본적인 타입과 변수 그리고 연산자를 사용하여 아래와 같은 프로필을 출력하시오. ## 출력 예 ``` 이름: 홍팍 학번: 2018122104 신장: 1.78m 남자인가요? true ``` --- ## 따라하기 ### Step 1: 클래스&메인메소드 ``` public class Profile { public static void main (String[] args) { } } ``` ### Step 2: 변수 생성 ``` public class Profile { public static void main (String[] args) { String name = "홍길동"; int studentNumber = 2018122104; double tall = 1.78; boolean isMale = true; } } ``` ### Step 3: 변수 및 문자열 출력 ``` public class Profile { public static void main (String[] args) { String name = "홍길동"; int studentNumber = 2018122104; double tall = 1.78; boolean isMale = true; System.out.println("이름: " + name); System.out.println("학번: " + studentNumber); System.out.println("신장: " + tall); System.out.println("남자인가요? " + isMale); } } ```
관련 강의로 이동

코드: java 1.8

public class Main { public static void main(String[] args) { } }

입력

정답이 궁금하다면? 코드를 제출해보세요!