Skip to content

Instantly share code, notes, and snippets.

@Wooking0310
Created December 10, 2015 13:06
Show Gist options
  • Save Wooking0310/803350bf846da1dbe408 to your computer and use it in GitHub Desktop.
Save Wooking0310/803350bf846da1dbe408 to your computer and use it in GitHub Desktop.
package cosmos.solarsystem;
import cosmos.cygnus.*;
/**
* Created by Wook on 2015-12-10.
*/
public class D5_Solar {
public static void main(String[] args) {
Sun sun = new Sun();
Vega vega = new Vega();
Denev denev = new Denev();
System.out.println(sun.getName());
System.out.println(vega.getName());
System.out.println(denev.getName());
}
}
class Sun {
public String getName() {
return "태양";
}
}
package cosmos.cygnus;
/**
* Created by Wook on 2015-12-10.
*/
public class Denev {
public String getName() {
return "데네브";
}
}
package cosmos.cygnus;
/**
* Created by Wook on 2015-12-10.
*/
public class Vega {
public String getName() {
return "베가";
}
}
@mindwing
Copy link

잘 하셨습니다.
채널에 좀 더 자세한 cosmos 예제가 있으니까 꼭 참조해보세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment