これは私が達成しようとしているものです
public class UDPThread extends Thread {
int port;
Spb_server station = null;
public UDPThread(int port, Spb_server station) {
this.port = port;
this.station = station;
}
public static void main(String[] args) {
new UDPThread(5002,station).start();
}
}
station
クラスの作成中のオブジェクトであり、メソッドSpb_server
でアクセスしたい。main
しかし、それは私がしstatic
たくない修飾子を作るように私に求めます。これを達成する方法はありますか?