• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Java, konstruktor wird nicht ausgeführt

Status
Für weitere Antworten geschlossen.

Frank

Neues Mitglied
Hey,
Ich habe mich nun ein bissl mit Java beschäftigt.
Nun habe ich ein Problem, mein Konstruktor wird nicht erkannt:
Code:
import org.apache.xmlrpc.XmlRpcClient;
import java.util.Vector;

/**
 * LotteryV4
 * A lottery for TrackmaniaUnited
 * Including a Top 5 and a Vote
 * cancelling / proceeding module
 */
public class TMInterface
{
	private XmlRpcClient client;
	private String address;
	private int port;

	public void TMInterface()
	{
		address = "localhost";
		port = 5000;
		System.out.println(address);
		System.out.println("\n");
		System.out.println(port);
	}
	public void setAddress(String newAddress)
	{
		address = newAddress;
	}
	public void setPort(int newPort)
	{
		port = newPort;
	}
	public boolean connect()
	{
		System.out.println(address+port);
		//client = new XmlRpcClient(address+port);
		return true;
	}
}

Beim erzeugen einer Instanz bekomme ich keine Ausgabe (die ich laut Konstruktor bekommen müsste)

Woran kann das liegen?
 
Werbung:
Hallo,

der Konstruktor hat keinen Rückgabewert, also auch nicht void.

Code:
public TMInterface() { ... }


N43
 
Werbung:
Status
Für weitere Antworten geschlossen.
Zurück
Oben