Created
February 1, 2015 14:23
-
-
Save takanakahiko/b67d64897956e055caf5 to your computer and use it in GitHub Desktop.
テスト
This file contains hidden or 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
| abstract class SushiYa{ | |
| static void vote(){ | |
| System.out.println("�ӉZ���i"); | |
| } | |
| } | |
| class Daisou extends SushiYa{ | |
| static void vote(){ | |
| System.out.println("���m���i"); | |
| } | |
| } | |
| class California extends SushiYa{ | |
| static void vote(){ | |
| System.out.println("�U�E�J���t�H���j�A���[��"); | |
| } | |
| } | |
| public class Hogehoge2{ | |
| public static void main(String[] args){ | |
| SushiYa[] mise ={new Daisou(),new Daisou(),new California(),new California(),new California()}; | |
| ((SushiYa)mise[0]).vote(); | |
| mise[1].vote(); | |
| mise[2].vote(); | |
| ((California)mise[3]).vote(); | |
| mise[4].vote(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment