live
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
RAGHU<br /> <br />"When the going gets tough, the tough get going"
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
RAGHU<br /> <br />"When the going gets tough, the tough get going"
Originally posted by Stan James:
I can't tell if you were confused by it or amused for the same reason I was surprised - class names are not reserved words.
RAGHU<br /> <br />"When the going gets tough, the tough get going"
Originally posted by Rao Raghu:
Isn't this a kind of a drawback of java which eats into the readability of the code?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Not quite. You have forgotten that "class" is a keyword (and reserved work).Class class = Class.getClass();
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
class names start with a capital letter, variable names do not
RAGHU<br /> <br />"When the going gets tough, the tough get going"
Originally posted by Rao Raghu:
This is just a convention. Even otherwise the class will compile and run fine. We are not bound in any way to follow the convention. The bottom-line is 'why should the language allow us to use class names as variable names in the first place?'
Originally posted by Paul Sturrock
If you give someone a hammer and he uses it to hit himself on the head, is it the hammer's fault he's able to hurt himself?
RAGHU<br /> <br />"When the going gets tough, the tough get going"
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |