Hello ranchers,
class Mytherad extends
Thread {
Mythread()
{
System.out.print("Mythread");
}
public void run()
{
Sytem.out.print("bar");
}
public void run(
String s)
{
System .out.print("hi");
}
}
class
Test {
public static void main(string a[])
{
Thread s= new Thread()
{
public void run()
{
System.out.print("foo");
}
};
t.start();
}
}
ans--Mythread foo but the ans should be Mythread bar.
You can also see the some thing different in this code
Can someone expalin