1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
hichkok12 [17]
3 years ago
12

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
Computers and Technology
2 answers:
dmitriy555 [2]3 years ago
7 0

Explanation:

what is this this is very long question I cannot answer this right now I need time

DarShadoJR3 years ago
0 0

I don't think you did anything wrong, I wen't over this 4 or 5 time's and I didn't see anything out of wack.

You might be interested in
Address whether each defense method listed above (single router, defense-in-depth, and demilitarized zone) is sufficiently diffe
bagirrra123 [75]

Answer:

Check the explanation

Explanation:

1) The single router approach is a security Implementation of all security policies and the defense-in depth approach employs a firewall. the DMZ approach Is establish between two routers with a firewall.

2) The single router approach is for small offices and homes.

The defense in depth approach is for large organizations.

The DMZ approach is for publicity operated networks.

3) The DMZ can provide better defense because it has more than two firewall for increased security.

5 0
4 years ago
I'm asking more questions for help with schoolwork, thank you for the help, giving Brainliest.
r-ruslan [8.4K]
Give them brainliest!
4 0
3 years ago
1. Trust can be built in a relationship if:
artcher [175]

Answer:

A

Explanation:

because if both parties feel safe communicating and feel understood by the other party they feel safe trusting the other person and it develops a trust worthy relationship

4 0
3 years ago
Rafter type and Truss type?
docker41 [41]

Answer:

Trusses and rafters are both assembled ahead of being installed onto the roof. Trusses are assembled in a factory using pre-engineered structures and joints. ... Rafters contain two main outer beams which support the roof structure. On the other hand, trusses come with multiple beams which add more support.

As the trusses come with a web of triangles inside the main frame, they provide more support than the rafters.

Trusses and rafters are both assembled ahead of being installed onto the roof. Trusses are assembled in a factory using pre-engineered structures and joints. On the other hand, rafters are assembled at the construction site. As trusses are assembled in a factory, a lot of time can be saved.

When comparing the cost of rafters and trusses, the latter ones cost more. But when considering the labor cost of constructing the roof using other means, it is better to purchase the trusses even though the costs are a bit higher. This is because there is no need to assemble the structure again at the construction site as they have been already assembled at the factories. But as rafters have to be assembled at the construction site, they involve more labor costs.

Summary:

1. Though both rafters and trusses are triangles in shape, the trusses have more triangle webs inside the principle frame.

2. Trusses are assembled in a factory using pre-engineered structures and joints. On the other hand, rafters are assembled at the construction site.

3. When comparing the cost of rafters and trusses, the latter ones cost more. But when considering the labor cost of constructing the roof using other means, it is better to purchase the trusses even though the costs are a bit higher.

4. As rafters have to be assembled at the construction site, they involve more labor costs.

5. Rafters contain two main outer beams which support the roof structure. On the other hand, trusses come with multiple beams which add more support.

6. Trusses also add an aesthetic beauty to the roofs.

8 0
2 years ago
Online banking tools allow you to pay bills from your computer. <br> a. True<br> b. False
Vaselesa [24]
On your online bank you can add bills from your computer. 
5 0
3 years ago
Read 2 more answers
Other questions:
  • 30 points!! What should I do if I plug my computer in and it starts making noises and sounds and it starts smelling.
    9·1 answer
  • Describe each of the six steps of the selection process as illustrated in chapter 12
    13·1 answer
  • In reference to computer communications, what does the term noise mean?
    8·2 answers
  • Strobe lights can become more yellow as they age true or false
    8·1 answer
  • JPG is considered a lossy file format. What does this mean?
    15·2 answers
  • Kali, a Python programmer, is using the turtle module to write the word "hello." Which code should she use to indicate the locat
    9·2 answers
  • Write an algorithm and draw flowchart to print 30 terms in the following sequence
    7·2 answers
  • How do i delete peoples comments
    14·2 answers
  • Ok it is important aspects which is perfect
    10·1 answer
  • When you started the vi editor, you forgot to specify the name for the new file you are creating. To save steps next time, how c
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!