Validation In Selenium

import com.thoughtworks.selenium.DefaultSelenium;



public class Validation {

public static DefaultSelenium selenium=new DefaultSelenium("localhost",6666,"*iehta","http://");
public static String Bodytext()
{
selenium.start();
selenium.open("http://google.com");
selenium.windowMaximize();

if(selenium.isTextPresent("Nag"))
{
System.out.println("Already checked");
}
else{
selenium.select("", "label=one");
//selenium.type("q", "selenium");
selenium.check("chkbox");

//System.out.println("Alert is not available");
}

selenium.click("btnG");
return "pass";
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Bodytext();

}

}