I was looking into the String.java source code when I found that one of the constructor has "String" object as parameter. This seems simple but I am not able to digest it. For example:
public class Example {
private String value;
public Example() {
// TODO Auto-generated constructor stub
}
public Example(Example e){
value = e.getValue();
}
String getValue() {
return value;
}
}
While compiling class Example for the first time, the compiler would encounter the second constructor with 'Example' class object as parameter. At this point, how will it find it as it is still compiling this class?