subject

Examine the following code. (1 point) Object obj = new Integer (5); Which of the following statements is true? The declared type of obj is Object. The actual type is also Object. The declared type of obj is Integer. The actual type is Object. The declared type of obj is Object. The actual type is Integer. The declared type of obj is Integer. The actual type is also Integer. 2. Examine the following code. (1 point) class D {} class C extends D {} class B extends D {} class A extends B {} Which of the following statements will compile without error? OA a = new B(); OB b = new DO); OCC = new AO; OD d = new A); Examine the following code.
(1 point) class One { public void print() { System. out. println("One"); } class Two extends One { public void print() { System. out. println("Two"); } class Three extends Two { public void print() { System. out. println("Three"); } Which of the following code fragments will compile without error and display something other than the word, "Three"? One w = new Three(); w. print(); Three x = new One(); x. print(); One y = new Two(); y. print(); Two z = new Three(); z. print();

(1 point) Suppose that class Alpha is the parent of Beta and Beta is the parent of Charlie. Method calculate() is defined in Beta and is inherited and overridden by Charlie. Which of the following code fragments shows a valid method call? Alpha k = new Beta(); k. calculate(); Alpha k = new Charlie(); k. calculate(); Beta k = new Charlie(); k. calculate();
Charlie k = new Object(); k. calculate(); 5. What is the output of the following program?

(1 point) public class Circle { private double radius; public Circle( double radius) { this. radius = radius; public static void main(String[] args) { Circle x = new Circle(5); Circle y = new Circle(5); Circle z = x; System. out. println(x. equals(y) + ", " + (x == z)); true, true true, false false, true false, false

6. Consider the following code. (1 point) ArrayList names = new ArrayList(); names. add("Alexa"); names. add("Bill"); names. add("Christine"); Which of the following statements will display, "Alexa"? System. out. println(names. get()); System. out. println(names. retrieve()); System. out. println(names. get(1)); System. out. println(names. retrieve (1));
Which of the following statements will display, “Alexa"? System. out. println(names. get(0); System. out. println(names. retrieve (0)); System. out. println(names. get(1)); System. out. println(names. retrieve(1));

7. Which field or method of the ArrayList class will return the number of elements stored in the ArrayList? (1 point) length length() size() capacity (1 point)

8. Which of the following sequences shows Java access modifiers in correct order from most restrictive to least restrictive? private, default, protected, public private, protected, default, public public, default, protected, private public, protected, default, private

9. Which of the following statements is true about the protected modifier? (1 point) A protected member can only be accessed by code in other classes in the same package. Not only can a protected member be accessed by code in other classes in the same package, it can also be inherited by a subclass, even if the subclass is in a different package. The public and protected modifiers are nearly identical except that protected level access can be turned on or off at runtime. The protected modifier should be used nearly all the time, even in combination with private and public, especially when sensitive data is involved.

10. Which of the following statements is true? (1 point) It is possible to create instances of a class marked final. It is possible to extend a class marked final. It is possible to override a method marked final. It is possible to override a method inherited from a class that is marked final. Finish Cancel
will give more point if you help

Will mark brainliest no bs answers

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
When you mouse over and click to add a search term this(these) boolean operator(s) is(are) not implied. (select all that apply)?
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
You know the right answer?
Examine the following code. (1 point) Object obj = new Integer (5); Which of the following statement...
Questions
question
Mathematics, 11.09.2020 03:01
question
Social Studies, 11.09.2020 03:01
question
History, 11.09.2020 03:01
question
Physics, 11.09.2020 03:01
question
History, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
World Languages, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
English, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01