Dropdown help java
I am trying to get dropdown list value from form and back to form if someone is updating existing record.. I tried to do this way..

    public String getOptionDropDownList()
    	{
    
    		if(getOption().compareTo("Y") == 0)
    				_ddlOption.setSelectedItem("Y");
    		else {(getOption().compareTo("N") == 0)
    				_ddlOption.setSelectedItem("N");
    		}
    		return _ddlOption.getHTMLString();
    	}

but i am getting this error.. 

    compile:
         [exec] com\jack\example\SampleBean.java:161: not a statement
         [exec]             else (getOption().compareTo("N") == 0)
         [exec]                      ^
         [exec] com\jack\example\SampleBean.java:162: ';' expected
         [exec]                             _ddlOption.setSelectedItem("N");
         [exec]                                 ^
         [exec] 2 errors

can somebody expalin me what i am doing wrong or is there other way to do this

ddlOption is declread as new Dropdown
getOption holds what is in the database
Dropdown help java
===

I am trying to get dropdown list value from form and back to form if someone is updating existing record.. I tried to do this way..

    public String getOptionDropDownList()
    	{
    
    		if(getOption().compareTo("Y") == 0)
    				_ddlOption.setSelectedItem("Y");
    		else {(getOption().compareTo("N") == 0)
    				_ddlOption.setSelectedItem("N");
    		}
    		return _ddlOption.getHTMLString();
    	}

but i am getting this error.. 

    compile:
         [exec] com\jack\example\SampleBean.java:161: not a statement
         [exec]             else (getOption().compareTo("N") == 0)
         [exec]                      ^
         [exec] com\jack\example\SampleBean.java:162: ';' expected
         [exec]                             _ddlOption.setSelectedItem("N");
         [exec]                                 ^
         [exec] 2 errors

can somebody expalin me what i am doing wrong or is there other way to do this

ddlOption is declread as new Dropdown
getOption holds what is in the database