|
According to what you said,I modified the
method.
---------------------------following error
code---------------------
int age;
public void setAge(int
person_age){ ///must use the string type param,
///otherwise error occurs
age=person_age;
}
public int
getAge(){ ///can't reutrn Int,otherwise error occurs
return age;
}
-----------------------------end---------
------------------------- The exception was still throwed
out unless I write code as following:
int age;
public pervoid setAge(String
son_age){ ///must use the string type param,
///otherwise error occurs
age=Integer.parseInt(person_age);
}
public String getAge(){
///can't reutrn Int,otherwise error
occurs
return
String.valueOf(age);
}
------------------------------------------------------------------
Why?Why?Why?Why?Why?Why?Why?Why?Why?Why?
Bea Weblogic6.1 sp1
J2SDK1.4
Win2K
|
- int type property in javaBean kongtao
- Re: int type property in javaBean Hiren Dossani
- Re: int type property in javaBean EswarChandu Nalluri
- Re: int type property in javaBean kongtao
- Re: int type property in javaBean EswarChandu Nalluri
- Re: int type property in javaBean Vikramjit Singh
