wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird, File's fields length Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird, File Watch "URLyBird, File New topic
Author

URLyBird, File's fields length

Didier Varon
Greenhorn

Joined: Jul 14, 2005
Posts: 23
I was going to implement the fields length as final variables of the data class, but since we have enum types I thought it would be better to use it, but going over the header description I found that the field's length is defined there, and now I would like to define those values dynamically when the file is loaded the first time, but I also would like to encapsulate those values on an enum type, but I do not know how to call the enum constructor using a variable reference (I think is not possible). In summary my question is should I create a class to handle those variables and set their values dynamically or create an enum type inside the data class?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Didier,
should I create a class to handle those variables and set their values dynamically or create an enum type inside the data class?
I would create a class to handle those variables and set their values dynamically.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: URLyBird, File's fields length
 
Similar Threads
i want some information related to enum keyword
Opinions On Reading Data File
binding of a var series to array members
Can a enum class be dynmaically created
Override Inherited Constants?