• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EL code magnet question from CH 8 HFSJ

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am studying thru CH 8 from HFSJ and had a question regarding the Code Magnet Answers from page 382. The authors mention about the "Bonus exercise: write the EL expressions a little differently (forget the magnets), but print the same result". The exercise is for composing the EL for the output:
Leelu's dog Clyde's toys are: stick, neighbor's cat, and a Barbie doll head.
I am wondering if any of you have an answer to that?
Will be much obliged.
Thanks,
Meera
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give more details, what is the source we can use to construct this EL ?
 
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That exercise is for you to try. If we provide you a solution, how will you learn. Remember that you can use whatever EL you want.

Hint: try to use [] instead of . or something of that sort to experiment...
 
meera kanekal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.
Meera
 
Vijitha Kumara
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

meera kanekal wrote:The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.


Yes, this is really friendly (perhaps the most ) forum. But you haven't provided enough information for us to give you a clue to solve your issue (not everybody have the book with them when they answer the posts).
 
Ankit Garg
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

meera kanekal wrote:The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.



I think you misunderstood me. I didn't mean to say that we'll not provide you the solution. What I was trying to say was that the question doesn't have a specific solution. You are free to explore EL and try to get the same output using EL. There can be multiple ways of solving that problem. Let me try to give you an example. The code magnets in the answer are (I've separated magnets with | symbol)


I can also write the EL as


or


There can be many more solutions like this...
 
meera kanekal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ankit for your input.
Regards,
Meera
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic