Dear All,
I just have one question about comparing a value to it's object/primitive type, hope anyone could help me with this.
Here's the story:
In the project I'm currently in, I need to validate user input :
cboParamType = "java.lang.Integer"
with
txtUserEntry1 = "HelloWorld"
or
txtUserEntry2 = "12345"
When user selected "java.lang.Integer" or other Object types from the ParamType combobox, How to check whether s/he has entered the correct object/primitive type in the User Entry textfield or not?
I am thinking to parse the userentry character by character, but I believe there must be a better way
Thus, in my example :
- comparing paramType with userEntry1 will results false.
- comparing paramType with userEntry2 will results true.
Any help would be appreciated.
regards,
Roy