|
One quick point, Brad... following this thread a little, the term this.MyClassList.get(index) makes me think that you have a variable named "MyClassList" (probably of type MyClassList). However, if I were to read this line of code without any history, I'd think that MyClassList was an inner class of MyClass, with a static method of "get". That's because, by convention, variable names always start with a lower case letter and class names with an upper case letter. This "convention" is rarely if ever broken. Joe > -----Original Message----- > From: owner-java400-l@midrange.com > [mailto:owner-java400-l@midrange.com]On Behalf Of Stone, Brad V (TC) > Sent: Monday, March 05, 2001 3:54 PM > To: 'JAVA400-L@midrange.com' > Subject: RE: Vector question > > > Ok, here's what I did... I made a method in MyClassList that looks like > this: > > public MyClass getMyClass(int index) > { > return (MyClass) this.MyClassList.get(index); > } > > This worked, I just want to make sure this is ok to do it this way (mainly > the casting part). > > Brad +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.