Multiple Choice Question

Quiz Guidelines

 

QID: 
198
Question: 

Note: Option 4 of this question may be considered too advanced for this exam.

Which lines of code will not be acceptable to the compiler?
import java.*; //1 
public abstract class InternalLogic //2 {  
 float density = 20.0; //3   
public class Doer //4   {      
void do() //5      {         //lot of valid code.      
}   
} }

Select 2 options

A. 1 
B. 2 
C. 3 
D. 4 
E. 5

Q&A Set: 

Comments

The position of comment statements can be changed. They can be moved to end of the statement for better readability.

 

public abstract class InternalLogic //2 {  

can be written as

public abstract class InternalLogic { //2

Yes, the curly brace can be moved to the next line. Do the questions appear in similar fashion in the exam?