Quote:
Originally Posted by Kodiak
Yup, he is right, you having that is like pretty much trying to make two jaguars of the same variable name, and in any programming language you can't simply do that.
|
Just to be clear, you CAN do that in java, you're just not going to be referring to the same variable throughout the program. If every variable name had to be completely unique, you wouldn't be able to use the same variable names as any of the variables used in the classes you import. For any large scale program it would get difficult pretty quickly to keep track of what variable names were used where.
His code will compile and run as it was, it's just not going to do what he expected it to.