Home

What is the correct answer?

4

What is error in the following class definitions? 
abstract class xy { 
abstract sum(int x, int y) {
}
}

A. class header is not define properly

B. constructor is no defined

C. method is not defined properly

D. no error

Correct Answer :

C. method is not defined properly


Related Questions

We can over load methods with differences only in their return type. Which of the following are the wrapper classes? In order to connect to a database through java program we must create… Which of the following methods can be used to remove a component from… The setBackground() method is part of the class Which of the following methods can be used to change the size of a size()… It is perfectly legal to refer to any instance variable inside of a static… When we implement the Runnable interface, we must define the method A JSP file can be stored_________________ A class may be both abstract and final. In RMI before running the client program we must start RMI Registry. A variable declared inside the for loop control can not be referenced… Consider the following statements: int x = 10, y = 15; x = ((x < y)… It is perfectly legal to assign a subclass object to a supper class reference. The concept of multiple inheritance is implemented in Java by DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend… Declaring a method synchronized guarantees that the deadlock cannot occur. Which of the following string can be used as mode string for creating… Which of the following statements are true? forName() is a static factory method The name of a Java program file must match the name of the class with… In the code below, what data types the variable x can have? When we invoke repaint () for a Component, the AWT invokes the method: An individual array element that is passed to a method and modified in… It is an error if a class with one or more abstract methods is not explicitly… A package is a collection of Which of the following statements are valid array declarations? Connection, Statement are interfaces and ResultSet is a class. It is an error to have a method with the same signature in both the super… The modulus operator (%) can be used only with Integer operands.