• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about tag

 
Timber Lee
Ranch Hand
Posts: 157
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given that file1.jsp has the following custom tag:
<m:test times="5"/>
And the actual class file has the following setter method for variable 'times':
void setTimes(int t){
this.t=t;}
Identify true statements:
A Code works fine
B Parameter t should be String int the method : setTimes(String t)
C The body of the method should be: this.t=Integer.parseInt(t)
D The name of the variable should be 'times'

B AND C are right ,why? please help to understand, thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic