Select the test program call for this method? A. System.out.printin(myList1.split(); O B. System.out.printin(myList1.reverseOrder(); OC. System.out.printin(myList1.isSubList(myList2); D. System.out.printin(myList1.sharedElements(myList2); O E. System.out.printin(myList1.cquals(myList2); O F. System.out.printin(list.de iete(ission(5); OG Svstem out nrintin(mvl ist1 delDuplicate0):

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Study the code below:
1. public
_(MyLinkedList sList)
{
2. if(this.head==null)||(sList.head3D%3Dnull))
3.
return false;
4.
5.
boolean test = false;
6.
for(Node<E>
ptrsList=sList.head;ptrsList!=null;ptrsList=ptrsList.next)
7.
{
8.
test = false;
9.
for(Node<E>
ptrthis=this.head;ptrthis!=null;ptrthis=ptrthis.next)
10.
{
11.
if(ptrsList.element.equals(ptrthis.element))
12.
{
13.
test = true;
14.
ptrthis=this.tail;
15.
16.
}
17.
if(!test)
18.
return false;
19.
20.
}
21.
return test;
22.}
Select the test program call for this method?
O A. System.out.printin(myList1.split();
O B. System.out.printin(myList1.reverseOrder();
O C. System.out.printin(myList1.isSubList(myList2);
O D. System.out.printin(myList1.sharedElements(myList2));
O E. System.out.println(myList1.cquals(myList2);
O F. System.out.printin(list.deiete()ssion(5);
O G. System.out.println(myList1.delDuplicate();
Add a caption..
Transcribed Image Text:Study the code below: 1. public _(MyLinkedList sList) { 2. if(this.head==null)||(sList.head3D%3Dnull)) 3. return false; 4. 5. boolean test = false; 6. for(Node<E> ptrsList=sList.head;ptrsList!=null;ptrsList=ptrsList.next) 7. { 8. test = false; 9. for(Node<E> ptrthis=this.head;ptrthis!=null;ptrthis=ptrthis.next) 10. { 11. if(ptrsList.element.equals(ptrthis.element)) 12. { 13. test = true; 14. ptrthis=this.tail; 15. 16. } 17. if(!test) 18. return false; 19. 20. } 21. return test; 22.} Select the test program call for this method? O A. System.out.printin(myList1.split(); O B. System.out.printin(myList1.reverseOrder(); O C. System.out.printin(myList1.isSubList(myList2); O D. System.out.printin(myList1.sharedElements(myList2)); O E. System.out.println(myList1.cquals(myList2); O F. System.out.printin(list.deiete()ssion(5); O G. System.out.println(myList1.delDuplicate(); Add a caption..
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education