| Author |
Is it a bug.............
|
Sandeep Jain
Ranch Hand
Joined: Oct 25, 2000
Posts: 124
|
|
Can any one explain me Why this peace of code compile Properly import java.lang.*; class String { } and this doesn't import java.lang.String; class String { } ------------------ Sandeep Jain
|
Try and Try Till u succeed<br /> <br />Sandeep Jain
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
|
|
Explicitly importing a class forces the current compilation process to treat that class as already defined. Importing a whole package just allows the compilation process to "see" those classes, if required. So trying to redefine String will be an error.
|
A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
|
 |
 |
|
|
subject: Is it a bug.............
|
|
|