-1
Name of the complete error:
Cliente.java:7: error: invalid method declaration; return type required public cliente() { ^
Code I used:
import java.net.Socket;
public class Cliente extends javax.swing.JFrame {
private static Socket cliente;
public teste() {
initComponents();
}
public static void main(String[] args){
}
private static void iniciaCliente(){
try{
cliente = new Socket("127.0.0.1 ",4444);
System.out.println("Conexão feita com sucesso");
} catch (IOException ex){
System.out.println("ErroConnect:");
}
}
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site
– Maniero