Prev Next

Java / final keyword

Where to initialize a non-static final variable?

Non-static final variable can be initialized when declared or in constructor only. Otherwise we will encounter compilation error.

More Related questions...

Show more question and Answers...


Comments & Discussions