I need to create java class which has 2 methods:

public class IPTPLogin extends IPTPCommand {
	/** The email address */
	private String login;
	/** The password of email */
	private String passcode;
	/** Creates a new instance of IPTPLogin */
	public IPTPLogin(String log, pass) {
		setLogin(log, pass);
	/** Set the login */
    protected void setLogin(String log) {
        login = new String(log);
	/** Set the Passcode */
    protected void setPasscode(String pass) {
        passcode = new String(pass);
	/** Get the sender address */
    public String getLogin() {
        return login;
	/** Get the Passcode */
    public String getPasscode() {
        return passcode;

So, that I could create object of class

IPTPLogin c = (IPTPLogin)command;

And, use methods of the class:

c.getLogin(), c.getPasscode()
6 Years
Discussion Span
Last Post by bibiki

I guess what you need is a controller class that has a main method inside it. then, in your main method, you instantiate an instance of your IPTPlogin class, and invoke the two methods just as you wrote above.

I can't give you the code, but here is a guideline.

class name as expected in java
    declaration of main method as expected in java
           instantiation of IPTPlogin object
                invocation of first method
                invocation of second method
    mark the end of main method
mark the end of class
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.