- 797 名前:デフォルトの名無しさん [2007/06/24(日) 17:36:52 ]
- 質問があります。入門書に以下のようなサンプル例文があったのですが、
実際のJavaプログラムではこのようなオブジェクト作成、クラス利用は どのように使われているのでしょうか? class roadstarCar{ int type; int engine; } void output(){ System.out.println("車の型は" +type); System.out.println("車のエンジンは" +type); } class honban{ public static void main(String args[]){ roadstarCar eunos = new roadstarCar(); eunos.type = NA6CE; eunos.engine = B6; eunos.output(); }
|

|