これは私が達成しようとしているものです
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たくない修飾子を作るように私に求めます。これを達成する方法はありますか?