Answer Posted / raju singh
class Car extends Thread
{
@override
public void run()
{
super.start();
System.out.println("This is start in car class");
}
@override
public void run()
{
System.out.println("Car is running");
}
}
class Application
{
public static void main(String []args)
{
Car c=new Car();
c.start();
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you change an int to a string?
What is a war file?
What is difference between fail-fast and fail-safe?
Can a private method of a superclass be declared within a subclass?
what is thread in Java ?
what is ststic with example
What are the advantages of user defined functions?
What is the class in java?
When object is created and destroyed?
What is outofmemoryerror in java?
What are functions in java?
Is java pass by value or pass by reference?
What is static block?
What are the major drawbacks of external iteration?
Can a java program have 2 main methods?