Java/study29 클래스 상속 123456789101112131415161718192021222324252627package study01; public class Car { private String company; String model; String color; public int speed = 250; //다른 패키지에서도 접근할 수 있다. Car(){ } Car(String model, String company, String color){ this.model = model; this.company = company; this.color = color; } public String getCompany() { return company; } public void setCompany(String company) { this.co.. 2019. 4. 9. static / Singleton / final /상수 123456789101112131415161718package study01; public class StaticTest { int field; static int staticfield; void method() { } //정적 메소드나 블럭에서는 this.를 사용하여 클래스의 인스턴스 멤버를 가져올 수 없기때문에 //클래스의 객체를 생성하고 참조변수로 접근해야한다. static void staticmethod() { StaticTest test = new StaticTest(); test.field=10; }}Colored by Color Scriptercs 123456789101112131415package study01; public class Singleton { private static Sin.. 2019. 4. 8. 공부해야할 내용들 - IoC 컨테이너- Spring Triangle (출처 : https://www.slideshare.net/vvijayaraghava/spring-framework-core-spring-v30) 2019. 4. 5. 참조 변수, 배열 (04/05) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103import java.util.Scanner;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.IOException; public class Hello { public static void main(String [] args) //다시 { int go = 1; w.. 2019. 4. 5. 이전 1 ··· 4 5 6 7 8 다음