what is the number of static init that I can have?

Recommended Answers

All 10 Replies

As many as you want - there's no limit.

What's to point of having multiple static initializers anyway?

Can't think of any necessary reasons, but it may make the code clearer if different parts of the initialisation are split up?

Just for curiosity... why ask for the number of static inits anyway?

ps: I too am a bit of a bluesman, but I'm only 70.

You beat me by 5 years. I turn 65 on Saturday. Any idea who the oldest (living) Daniweb member is? Dani should be able to query the database to find out.

Entering your birthday is optional, and it's a hidden field, so I wouldn't feel comfortable saying who it was in public anyways. My guess would have been Ancient Dragon before he passed away.

OK, you've convinced me to search the database. A handful of 90+!! A bigger handful of 80+. Then it steadily goes down from there.

commented: When I started programming we didn't have any of those sissy icons and windows. "Get off my lawn!" +15

Well keep in mind that we are also a tech support forum.

And who is the youngest member here ?

As many as you would like, however the static initializers {and class|and sophistication} variable initializers are executed in textual order and should not refer to class variables declared in the class whose declarations seem textually once the use, despite the fact that these class variables are in scope.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.