how to add more methods to class methods
Hello all
I don抰 know how exactly explain my problem but I will try .
I have base class that has some methods that I use on the jsp page.
my base class looks like this :
class base{
publicstatic String getName(){
String myName =new String("miki");
return myName;
}
publicstaticint getAge(){
int myAge =new Int(30);
return myAge;
}
}
now I will like this methods to have more methods for example toBoolean()
so if I will do :
<%
base.getAge().toBoolean();
or
base.getAge().toBoolean();
%>
it willreturn metrue orfalseif age is less then 0 sofalse
andif the name string len is 0 also flase
and other wisetrue ;
how can I implementthis functions on my methods?
hope I made my self clear
thanks

