• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Constants in Classic Tag

 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read this in a post related to Constants returned from Class Tag methods..


public static final int EVAL_BODY_AGAIN = 2
public static final int EVAL_BODY_BUFFERED = 2

both are having value 2 so practically doStartTag can return EVAL_BODY_AGAIN



My Ques.
Are we supposed to know what is the integer value for each of the constants returned = such that if two constants have same value these can be interchanged??? . If so, can someone list all the constant and their mapped integer values over here...

Regards,
Shivani.
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think though the integer values of the constants are same, they are used the return value of the different methods.

The doStartTag can return the EVAL_BODY_BUFFERED and the doAfterBody can return the EVAL_BODY_AGAIN. So, no problem of same values. I think the constants have given to descriptive names to identify the purpose. As these are compile time constants, you can use the direct value, instead of these constants.

For the Exam You do not have to know the value of these constants.

Thanks
[ August 24, 2006: Message edited by: Narendra Dhande ]
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic