Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Nayab Azeem:
But, this raises another question as to do we need(or suggest to use) private for static fiels also??? If no, then static may had been defined in such a way that it is by default "public static" and then doing this might have helped in enforcing two standards , with regard to public and static separately....
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Amit Biswas:
Public access modifiers are mandatory for field in interfaces.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Nayab Azeem:
But, this raises another question as to do we need(or suggest to use) private for static fiels also??? If no, then static may had been defined in such a way that it is by default "public static" and then doing this might have helped in enforcing two standards , with regard to public and static separately....
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
"I'm not back." - Bill Harding, Twister
Originally posted by Jim Yingst:
[Peter Chase]: Note finally that any fields in interfaces have to be "static" and "final" - i.e. constant. However, these modifiers aren't implied AFAIK, so you have to give them explicitly.
Any fields in an interface are implicitly public, static, and final - you don't have to specify those modifiers.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Shucks, you have got me all embarrassed. No, seriously we are only too pleased to help.Your example presents a gud scenario where we need it.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Peter Chase:
In this example, the "public" on the fields makes no difference. The outer class can access inner class members, whatever their access modifier.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Not quite true.
Public access modifier is implied in interfaces. It is legal to declare any field or method in an interface explicitly as "public".
Don't get me started about those stupid light bulbs. |