Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp question from "using jsp" chapter of Head First book

 
Swagato Bhatta
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the "using JSP" chapter there is a mock exam magnet question ...

In the solution it states something like this



I wrote like as below



I wonder if it will also work!?!
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if it will also work!?!

Why don't you run it and see for yourself?? You are printing the whole ArrayList in the loop instead of a single element, so correct that and try to run it...
 
Sita Marivada
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the statement you wrote
out.println(a1);
Change al to a, then it will work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic