Wednesday, March 02, 2005

Probleminha de Java - alguém?

Arquivo ChatClient.java:

import java.net.*;
.
.
.
try
{
MySocket sConnection = new MySocket("7.0.8.75", 5432, "Felipe");
.

.
.

Arquivo MySocket.java:

import java.net.*;
public class MySocket extends Socket

{
private String userName;

public MySocket(InetAddress address, int port, String userName) throws Exception
{
super(address, port);
this.userName = userName;

}

public String getUserName()
{
return (this.userName);
}
}


e não consigo resolver o maldito erro a seguir:


ChatClient.java:74: cannot find symbol
symbol : constructor MySocket(java.lang.String,int,java.lang.String)
location: class MySocket
sConnection = new MySocket("7.0.8.75", 5432, "Felipe");
^
1 error


Alguém?

3 Comments:

At 11:04 AM, Blogger Celso Filho said...

O problema é de If


If (programador = "Primo") then

NOTION ERROR!

 
At 11:17 AM, Blogger felipe said...

Na verdade, como se trata de Java, o seu trecho de código contém alguns erros de sintaxe. O correto seria:

if (programador == "Primo")
{
return NOTION_ERROR
}

 
At 11:39 PM, Blogger Celso Filho said...

ah sim...

 

Post a Comment

<< Home