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 [EMAIL PROTECTED]
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.

Reply via email to