What is the correct answer?


The setBackground() method is part of the class

A. Applet

B. Component

C. Container

D. Object

Correct Answer :

B. Component

Related Questions

When we implement the Runnable interface, we must define the method It is perfectly legal to refer to any instance variable inside of a static… Throwing an exception always causes program termination. In the code below, what data types the variable x can have? Which of the following statements are true? A package is a collection of Two methods cannot have the same name in Java. Which of the following string can be used as mode string for creating… Which javadoc tag is used to denote a comment for methods parameters? putValue(...) method takes _____________________- The length of a string object 's1' can be obtained using the expression… The concept of multiple inheritance is implemented in Java by Which of the following statements are valid array declarations? The check box group class is a subclass of the component class. Any class may be inherited by another class in the same package. One the features of is that an array can store many different types of… The name of a Java program file must match the name of the class with… The expression (x == y && a<b) is true If either x == y is true or… Which of the following classes are available in the java.lang package? If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value… A static class method can be invoked by simply using the name of the method… Consider the following class definitions: class maths { student student1;… DataInput is It is perfectly legal to assign a subclass object to a supper class reference. A string object can not be modified after it is created. A variable declared inside the for loop control can not be referenced… If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value… Message-Driven beans act as a listener for the Java Message Service API,… Which of the following methods can be used to draw the outline of a square? If you want to assign a value of 99 to the variable year, then which of…