On 4 May 2012 01:24, [email protected] <[email protected]> wrote: > public class TheClass extends Guigui > { > ... > /*#! Singleton */ > static > { > if (m_instance == null) { > try { > m_instance = new TheClass(); > } > catch (Throwable e) { > throw new RuntimeException(e.getMessage()); > } > } > } > ... > }
What if the constructor could throw a genuine exception (say file not found) or you wanted to supply some non-static arguments to it? -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

