Assume that Employee has been defined as a class in a Java program. Consider the declaration “Employee emp;”. Does emp point to an Employee object? [yes or no]

Assume that Employee has been defined as a class in a Java program. Consider the declaration “Employee emp;”. Does emp point to an Employee object? [yes or no]

LANGUAGE: JAVA

CHALLENGE:

QUESTION 1: Assume that Employee has been defined as a class in a Java program. Consider the declaration “Employee emp;”. Does emp point to an Employee object? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 2: Does emp refer to an Employee object? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 3: Is emp of type pointer to Employee object? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 4: Does emp contain an Employee object? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 5: Can emp later be assigned an Employee object? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 6: Is emp of type reference-to-Employee? [yes or no]:

SOLUTION:

yes

CHALLENGE:

QUESTION 7: Can emp later refer to an -Employee? [yes or no]:

SOLUTION:

yes

CHALLENGE:

QUESTION 8: Can emp later point to an -Employee? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 9: Is emp of type Employee? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 10: Is emp a class? [yes or no]:

SOLUTION:

no

CHALLENGE:

QUESTION 11: Is emp an object? [yes or no]:

SOLUTION:

no

Add comment