Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Programmer Certification (OCPJP)
final variable
nishesh chouhan
Ranch Hand
Posts: 37
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
final int i;
i=234;
says indentifier expected ???
ps tell me something abuot this were else we can intialize final variable
jeena jose
Ranch Hand
Posts: 69
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
final variable should be initialized either in declaration or in every constructor.
class Test{
final int a=9;
final int b;
Test
(){
b=6;}
}
jeena jose
Ashish Chande
Ranch Hand
Posts: 51
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
final variables can also be initialised in Initialiser blocks or they should be initialized in every constructor
Ashish
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Legal arguments in switch case statements
final variable question from kb
Is final variable i:final int i=0;on stack or heap?
Why this error Incompatible types?
Significance of 'final' modifier
More...