Last active
January 12, 2021 05:41
-
-
Save youngjinmo/78581da7fe7027012de7e9d23934428c to your computer and use it in GitHub Desktop.
백선장님 라이브 스터디 2주차 과제 예제 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StudyHaleEx01 { | |
public static void main(String[] args) { | |
StudyHale02 study = new StudyHale02(); | |
int[] arr = new int[10]; | |
// 타입 추론 | |
var typeInference01 = "greeting"; | |
var typeInference02 = arr; | |
var typeInference03 = study; | |
var typeInference04 = study.greeting; | |
System.out.println(typeInference01.getClass().getSimpleName()); | |
System.out.println(typeInference02.getClass().getSimpleName()); | |
System.out.println(typeInference03.getClass().getSimpleName()); | |
System.out.println(typeInference04.getClass().getSimpleName()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StudyHale02 { | |
String greeting = "hello"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment