here is a sample code from 1 of the mock exams , the start() method of the
Thread class in not static, here the method is called just as start() . so the code should give compiler error, is that rite ?
public class Tux extends Thread
{
static
String sName = "Techno";
public static void main(String argv[])
{
Tux t = new Tux();
t.name(sName);
System.out.println(sName);
}
public void name(String sName)
{
sName = sName + " park";
start(); }
public void run()
{
for(int i=0;i < 4; i++)
{
sName = sName + " " + i;
}
}
}