Multiple Choice Question

Quiz Guidelines

 

QID: 
64
Tags: 
Question: 

Consider the following two java files:

//in file SM.java 

package x.y; 
public class SM{    
public static void foo(){ }; } 

//in file TestClass.java 

//insert import statement here //1 
public class TestClass{  
public static void main(String[] args){      
foo();   
} 
}

What should be inserted at //1 so that TestClass will compile and run?

Select 2 options 

A. import static x.y.*; 
B. import static x.y.SM; 
C. import static x.y.SM.foo; 
D. import static x.y.SM.foo(); 
E. import static x.y.SM.*;

Q&A Set: