<identifier> expected error, some one help me

I'm new in Java, and I encountered a problem

The codes are below

import javax.mail.*;

import alertregister.*;

import arutility.*;

public class GetConnection

{

public final String STRMAILSERVER = "www.hi.com";

public final String STRUSERNAME = "abc";

public final String STRPASSWORD = "abc";

private int intRetryInterval = 1;

private int intCount = 0;

ARMailMonitor m_objMailMonitor = new ARMailMonitor();

ARMailAccessor m_objMailAccessor = new ARMailAccessor();

m_objMailAccessor.setMailServer(STRMAILSERVER);

m_objMailAccessor.setUsername(STRUSERNAME);

m_objMailAccessor.setPassword(STRPASSWORD);

public boolean getConn()

{

ARProcessResult m_checkMailServerConnection =

m_objMailMonitor.checkMailServerConnection(m_objMailAccessor, intRetryInterval, intCount);

if ("Success".equals(m_checkMailServerConnection.toString()))

{

return true;

}

else

{

return false;

}

}

public static void main(String[] args)

{

GetConnection objGetConnection = new GetConnection();

if (objGetConnection.getConn())

{

System.out.println("Connected");

}

else

{

System.out.println("not connected");

}

}

}

when I am compling, the error messages are

GetConnection.java:16: <identifier> expected

m_objMailAccessor.setMailServer(STRMAILSERVER);

^

GetConnection.java:17: <identifier> expected

m_objMailAccessor.setUsername(STRUSERNAME);

^

GetConnection.java:18: <identifier> expected

m_objMailAccessor.setPassword(STRPASSWORD);

^

3 errors

I am really confused about that error message

[1808 byte] By [asleepyheada] at [2007-10-3 10:15:56]
# 1
This code is in the class and needs to be inside of a method, constructor or some other block " m_objMailAccessor.setMailServer(STRMAILSERVER);m_objMailAccessor.setUsername(STRUSERNAME);m_objMailAccessor.setPassword(STRPASSWORD);
zadoka at 2007-7-15 5:36:40 > top of Java-index,Developer Tools,Java Compiler...
# 2
Did you solve this problem.i am having same problem with my jsp code.
sangu71a at 2007-7-15 5:36:40 > top of Java-index,Developer Tools,Java Compiler...