Oracle 1Z0-808 Exam question no. 4

Q.– Given this segment of code:-

                  ArrayList<cycle> myList = new ArrayList<>(); 
                    myList.add(new Motorcycle( ));

Which two statements, if either were true, would make the code compile? 

A) cycle and Motorcycle both extend the Transportation super-class.  
B) cycle is an interface that is implemented by the Motorcycle class. 
C) cycle and Motorcycle both implement the Transportation Interface.  
D) Motorcycle is a super-class of cycle. 
E) Motorcycle is an interface that implements the Cycle class.  
F) cycle is an abstract super-class of Motorcycle. 


⧪ please give your answer in a comment section.

Post a Comment

11 Comments