| 問題4-7 |
|---|
次のプログラムをコンパイルし、実行結果として正しいものを選択してください。(1つ選択)
1:interface Animal{}
2:clss Cat{}
3:
4:class Sample{
5: public static void main(String[] args){
6: Cat c = new Cat();
7: Animal a = (Animal)c;
8: }
9:}
|
| 問題4-7 |
|---|
次のプログラムをコンパイルし、実行結果として正しいものを選択してください。(1つ選択)
1:interface Animal{}
2:clss Cat{}
3:
4:class Sample{
5: public static void main(String[] args){
6: Cat c = new Cat();
7: Animal a = (Animal)c;
8: }
9:}
|