Problem statement: what will be the output of the below code?
class C{
public void run(int a){
System.out.println("int: "+a);
}
public void run(long a){
System.out.println("long");
}
}
public class DemoSample1 {
public static void main(String args[]){
C c = new C();
c.run('a');
}
}
Output:int: 97
No comments:
Post a Comment