--------------------------------------------------------------------------------
class ThreeConst {
public static void main(
String[] args) {
new ThreeConst();
}
public void ThreeConst(int x) {
System.out.print(" " + (x * 2));
}
public void ThreeConst(long x) {
System.out.print(" " + x);
}
public void ThreeConst() {
System.out.print("no-arg ");
}
}
The above code prints no output but my doubt is as per overloading rule different arg. type only allowed then how is it possible?