Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

<identifier> expected

843810Dec 7 2005 — edited Dec 8 2005
Can anyone help me with this. I am learning Java and am getting this error message:

C:\Alltigo\MyPeer.java:7: <identifier> expected
peerConfiguration.setPeerType(MyPeer)
^

And my source code is:

import com.alltigo.locationtag.sdk.Peer;
import com.alltigo.locationtag.sdk.PeerConfiguration;

public class MyPeer extends Peer
{
PeerConfiguration peerConfiguration = new PeerConfiguration();
peerConfiguration.setPeerType(MyPeer)
{
myPeer = (myPeer) PeerFactory.createPeer(peerConfiguration);
myPeer.addConnectionStatusListener(new ConnectionListener());
myPeer.connect("xmpp.alltigo.com");
};

public void MonitorPeer(PeerConfiguration peerConfiguration)
{
super(peerConfiguration);
}

protected void initialize() throws LocationTagException{}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 5 2006
Added on Dec 7 2005
3 comments
199 views