Call java method from other class (servlet) : I want to call a method from my Servlet but I think I messed something up with the declaration.

It says 

> " The method println(boolean) in the type Printwriter is not
> applicable for the arguments (void)"

 .

Here is a part of my servlet

    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {  
    String Name = request.getParamter("name");  
    Printwriter = p=response.getWriter();
    Names n = new Names();
    n.setName(Name);
    p.println(Names.theName());


And here is my other class

    ... (getter and setter for Name) ...
    public void theName(){ if(Name.equals("Josh"){ System.out.println("Hi Josh, what's up?")}
    if(Name.equals("Peter"){System.out.printlkn("Hi Peter, how are you?")}
    }


