Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the Java API (http://docs.oracle.com/javase/8/docs/api/) to answer the quest

ID: 3789982 • Letter: U

Question

Use the Java API (http://docs.oracle.com/javase/8/docs/api/) to answer the questions below. In the list of classes on the lower left of the API, how can you identify whether the item listed is a class or an interface? What interfaces does Scanner implement? Which interface, if any, specifies that Scanner should have a hasNext() method? Which interface, if any, specifies that Scanner should have a nextLine() method? How many classes are known to implement the Deque interface? What is the parent of the Deque interface? Identify one method required by Deque that is not required by its parent. Read the description of the AbstractList. Identify one method that you must implement in a subclass if you want the list to be mutable. Identify one non-abstract class that is a subclass of AbstractList. Can abstract classes implement interfaces? If so, find an example of one that does. Identify a checked exception class that does not inherit from IOException. Give an example of why the exception you identified in #11 might be thrown. Describe the difference between checked and unchecked exceptions. Identify a class that inherits from Error. Given an example of why the error you identified in #14 might be thrown.

Explanation / Answer

2.java.util.Scanner implements java.util.Iterator interface

6. Queue is parent of Deque

10.In Java, an abstract class can implement an interface.

Ex.

interface SomeInterface {

   void foo();

   int bar();

}

public abstract class YourClass implements SomeInterface {

   // no mention of foo() and bar() here

}

==========================================================

14.Thowable class inherits from Error