Please help me for the java homework, thank you very much,...... The following c
ID: 3840638 • Letter: P
Question
Please help me for the java homework, thank you very much,......
The following code is an example of the use of __ if (message instance of LoanRequest) {} a. Java Reflections b. Encapsulation c. Polymorphism d. Abstraction Assume that myLst is an ArrayList. Collections.shuffle(myLst) will __ a. Randomize the elements in myLst. b. Randomize the elements in myLst and return the first item. c. Randomize the first 100 elements in myLst. d. Answers a & b Consider the following code (syntax is valid): public class Program {boolean value = true; public boolean IsTrue() {if (value == true) return true; else if (value == false) return false;}} The method IsTrue () will: a. Return boolean value 'true' b. This class will not compile c. This will fail at runtime d. Return boolean value 'false' Consider the following two methods: private static int max(int num1, int num2) {} private static int max(int num1, int num2, int num3) {} This is an example of a. Overloading b. Overriding c. Abstraction d. Information hiding __ is a list of privileges or objects the user has access. a. Authorization b. Authentication c. Membership d. Profile Class B can extend Class A. Can Interface J extend Interface I? a. Yes b. NoExplanation / Answer
if (message instanceof LoanRequest) {} is an example of Java Reflections. Hence answer is option a. Collections.shuffle(myLst) will randomize the elements in myLst. Hence answer is option a The method IsTrue() will return boolean value true. In Java, boolean can take values true or false. Hence answer is option a private static int max(int num1, int num2) {} and private static int max(int num1, int num2, num3) {} are examples of method overloading. Here method overloading is done by changing no of arguments. Hence answer is option a Authorization is a list of privileges or object the user has access. Hence answer is option a Interfaces have no implementation. An interface can however extend another interface, which means it can add more methods and inherit its type. So, Interface J can extend Interface I. Hence answer is option a.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.