Consider the following class definitions:

1.5 Consider the following class definitions:
class mathstest
{
Student student1;
}
class Student
{
String name;
}
This code represents:
A) an ‘is a’ relationship
B) a ‘has a’ relationship
C) both
D) neither

What is the error in the following class definition?

1.4 What is the error in the following class definition?
abstract class MyTest
{
abstract sum (int x, int y) { }
}
A) Class header is not defined properly
B) Constructor is not defined
C) Method is not defined properly
D) No error

Consider the following code

1.3 Consider the following code
if ( number >= 0)
if (number > 0)
System.out.println(“Number is positive”);
else
System.out.println(“Number is negative”);
What will be the output if number is equal to 0?
A) Number is negative
B) Number is positive
C) Both A) and B)
D) None of the above