質問があります。入門書に以下のようなサンプル例文があったのですが、
実際の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();
}