You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by shyam kishore alapati <sh...@mailnation.net> on 2006/01/10 16:09:31 UTC

Re: which is a good instance variable

I think it purely depends on your requirement. But why do you want an InputStream as a class variable. I think that is very costly resource and you are blocking a resource.Others i think you can use it based on your requirement. For iteratorsif u declare it as class level variables if the underlying collection changes the iterator gets in valid.
-----Original message-----
From: Carl Smith ccsmith20002001@yahoo.com
Date: Tue, 10 Jan 2006 19:35:58 -0800
To: Struts Users Mailing List user@struts.apache.org
Subject: which is a good instance variable

> I am designing a new class and wondering what class are a good candidates for the class attribute. I know String, Date, Integer, int, fload, boolean, Boolean all are good for instance variables, but classes/interfaces like Map, InputStream, Iterator are also good instance variable cadidate? Why?
>    
>   Thanks.
> 
> 		
> ---------------------------------
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.