Multiple Choice Question

Quiz Guidelines

 

QID: 
280
Question: 

What will be the result of attempting to compile this class?

import java.util.*;
package test;
public class TestClass{
public OtherClass oc = new OtherClass();
}class OtherClass{
int value;
}

Select 1 option

A. The class will fail to compile, since the class OtherClass is used before it is defined.
B. There is no problem with the code.
C. The class will fail to compile, since the class OtherClass must be defined in a file called OtherClass.java
D. The class will fail to compile .
E. None of the above. 

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!