Linked List Test Part 1
By Mickey Arnold
starstarstarstarstarstarstarstarstarstar
Last updated 10 months ago
6 Questions
1 point
1
Question 1
1.
What is the output of the code?
String a = "abcdef";String b = a;System.out.println(b);
What is the output of the code?
String a = "abcdef";
String b = a;
System.out.println(b);
1 point
1
Question 2
2.
What is the output of the code?
String c = "abcdef";String d = c;c = null;System.out.println(d);
What is the output of the code?
String c = "abcdef";
String d = c;
c = null;
System.out.println(d);
1 point
1
Question 3
3.
What is the output of the code?
String e = "abcdef";String f = new String("abcdef");System.out.println(e==f);
What is the output of the code?
String e = "abcdef";
String f = new String("abcdef");
System.out.println(e==f);
1 point
1
Question 4
4.
What is the output of the code?
Object g = "hippononamus";System.out.println(g);
What is the output of the code?
Object g = "hippononamus";
System.out.println(g);
1 point
1
Question 5
5.
What is the output?
ListNode x = new ListNode("3", new ListNode("1",new ListNode("5", null ) ) ) ;
out.println(x.getValue());out.println(x.getNext().getNext().getValue());out.println(x.getNext().getValue());
What is the output?
ListNode x = new ListNode("3", new ListNode("1",new ListNode("5", null ) ) ) ;
out.println(x.getValue());
out.println(x.getNext().getNext().getValue());
out.println(x.getNext().getValue());
1 point
1
Question 6
6.
Fill the blanks below to print out the entire list.
ListNode z = new ListNode("four", new ListNode ("one", new ListNode("two", new ListNode("three", new ListNode ("six", null ) ) ) ) );
while( <*1> ) {
<*2>
<*3>
}
Fill the blanks below to print out the entire list.
What should fill <*1>? _______
What should fill <*2>? _______
What should fill <*3>? _______