Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question about tag

Timber Lee
Ranch Hand
Posts: 157
  • 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){
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
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!