Question Index

What will be the output of the following program?

class RunnableTest extends java.util.Vector implements Runnable { // LINE A
    public void run() { // LINE C
        System.out.println("Run Method");
public class Test {
    public static void main(String[] args) {
        Runnable obj = new RunnableTest(); // LINE D
        Thread t = new Thread(obj); // LINE B

Run Method
Compile time Error at LINE A
Compile Error at LINE B because we can not pass parameter to Thread
Compile time Error at LINE C
Run time Error at LINE D



Topic: What is Multitasking and Multithreading?

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App