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

Which list of access specifiers is ordered from least restrictive to most restri

ID: 3900146 • Letter: W

Question

Which list of access specifiers is ordered from least restrictive to most restrictive? a) public, private, protected b) public, protected, private c) protected, public, private d) private, protected, public e) protected, private, public 2 Thing is a class, what must be true to allow TreeSet ts; to be legal? a) Thing must import TreeSet b) Thing must implement Comparable c) Thing must override hashcode d) TreeSet must import Thing e) Thing must inherit from TreeSet 3 Which of the following could be legal? a) class X extends B,C b) class X implements X c) class X extends B implements Object d) class X extends B implements D, E e) class X implements extends 4 Which of the following conversions would require an explicit cast? a) int- float b) long ? int c) float ? double d) char int e) byte int

Explanation / Answer

1(b) public, protected, private

2(b) Thing must implement comparable

3(d) class X extends B implements D,E

4(b) long -> int

5

6(b) there is no object for this to refer to

7(d) 16

8(d) 5 6

9(d) 3

Since expression

10(b) 2 15

11(c) 13

since 8+5=13

12(e)

13(a) long, short, int

14(c)

15 (d)

Thanks..........................

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote