--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/
Hey Hendre,
Take care that you really need the variable to be static (see Ewald’s reply).
Thread safety can be an issue in a multi-threaded environment.
Regards
Paul.
SANTAM Bpk / Ltd Reg. No. 1918/001680/06 Directors: VP Khanyile (Chairman), IM Kirk (Chief Executive), B Campbell, MD Dunn, MP Fandeso, BTPKM Gamedze, MLD Marole, JP Moller, YG Muthien, Dr J van Zyl, Y Ramiah, MJ Reyneke (Executive) Company Secretary: M Allie Please note: This email and its content are subject to the disclaimer as displayed at the following link http://www.santam.co.za/disclaimer.htm. Should you not have Web access, send a mail to discl...@santam.co.za and a copy will be emailed to you. |
--
> Can i also say
>
> SomeClass.p = new Person();
Yes
Len
> When I add final to the statement can I call p.setName("Hendre");
>
Yes, because you are not making the instance final - you are making the reference variable final.
Kind Regards,
Etienne Pretorius
Fantastic! static and final works on the reference and not the instance.How do this relate to primitive types?Can i do the followingpublic static int TEMP_VALUE = -1;