Which lines that are marked will compile in the following code? Select the five correct answers. (a)
Question:
Which lines that are marked will compile in the following code?
Select the five correct answers.
(a) (1)
(b) (2)
(c) (3)
(d) (4)
(e) (5)
(f) (6)
(g) (7)
(h) (8)
(i) (9)
(j) (10)
(k) (11)
(l) (12)
Transcribed Image Text:
// File name: A.java package packageA; public class A ( protected int pf; } // File name: B.java package packageB; import packageA. A; public class B extends A { void action (A obj1, B obj2, C obj3) { pf = 10; } } } } obj1.pf obj2.pf = 10; 10; obj 3.pf = 10; class C extends B { void action (A obj1, B obj2, C obj3) { pf = 10; } = obj1.pf obj2.pf obj 3.pf = = = = 10; 10; 10; class D { void action (A obj1, B obj2, C obj3) { pf = 10; obj1.pf obj2.pf obj 3.pf = = // (1) // (2) // (3) // (4) 10; 10; 10; // (5) // (6) // (7) // (8) // (9) // (10) // (11) // (12)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (QA)
a c d e and h The lines 1 3 4 5 and 8 will compile A protected member of a superclass is ...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Programmers Guide To Java SE 8 Oracle Certified Associate OCA
ISBN: 9780132930215
1st Edition
Authors: Khalid Mughal, Rolf Rasmussen
Question Posted:
Students also viewed these Computer science questions
-
Solve each inequality and graph its solution. 128m +7-3m> 7-8m 2 3 4 5 6 7 8 9 10 11 12
-
In Exercises find the arc length of the graph of the function over the indicated interval. y = 2x/2 + 3 60 50 40 30 20 10 H y=2x3/2+3] 2 4 6 8 10 12
-
In Exercises, find the area of the region. Use a graphing utility to verify your result. S x x 3x 1 dx - 18 15 12 + -6-3 y 9. 6 3 6 9 12
-
Table 2-5 Estonia Finland One Cell Phone 40 hours 16 hours Lumber (per board foot) 8 hours 4 hours Table 2-5 shows the number of labor hours required to produce a cell phone and a board foot of...
-
A 25-turn circular coil of wire has diameter 1.00 m. It is placed with its axis along the direction of the Earths magnetic field of 50.0 /T, and then in 0.200 s it is flipped 180. An average emf of...
-
What is the auditors main goal in analyzing the cash flow statement?
-
Is breathing a voluntary or involuntary action?
-
1. Describe Cream Silks promotion within the context of the multi-attribute model. 2. Will the people who left with the positive attitude purchase the product? What other factors might influence...
-
1. The manufacturer-recommended pressure of air in the tires of US passenger cars is typically 30 psi (gauge). (a) Find the absolute pressure of the air inside tires and express it in mmHg, kPa, and...
-
Which statements about the use of modifiers are true? Select the two correct answers. (a) If no accessibility modifier (public, protected, or private) is specified for a member declaration, the...
-
Which statement is true about the accessibility of members? Select the one correct answer. (a) A private member is always accessible within the same package. (b) A private member can be accessed only...
-
What is the tax advantage of selling a Section 1231 property at a gain?
-
Forward buying results in a stabilized buying pattern. small orders during the promotion period followed by very small orders after that. small orders during the promotion period followed by large...
-
Define the key performance metrics for facilities and discuss their role in creating strategic fit between the supply chain strategy and the competitive strategy.
-
The set of business processes required to purchase goods and services is known as the cycle inventory. the safety inventory. the seasonal inventory. sourcing.
-
Kitchen Trims is a manufacturer of cornice and pelmet trims for the kitchen manufacturer market. It has production capacity of 1,500 units per day. Currently, the company sells production capacity...
-
Long-term boom and bust cycles that mimic the bullwhip effect have been seen within the following product groups: calendars and greeting cards. cat food. university textbooks. memory chips for...
-
Custom Industries purchases new specialized manufacturing equipment on July 1, 2011. The equipment cash price is $96,000. Custom signs a deferred payment contract that provides for a down payment of...
-
After graduating from college and working a few years at a small technology firm. Preet scored a high-level job in the logistics department at Amex Corporation. Amex sells high-quality electronic...
-
What is the output of the following code? b = 1; while(b < 4) { System.out.print(b + " "); b = b + 1; } a. 1 b. 1 2 3 c. 1 2 3 4 d. 1 1 1 1 1...
-
What is the output of the following code? e = 1; while(e < 4); System.out.print(e + " "); a. Nothing b. 1 1 1 1 1 1... c. 1 2 3 4 d. 4 4 4 4 4 4...
-
Write an application that allows a user to enter any number of student test scores until the user enters 999. If the score entered is less than 0 or more than 100, display\ an appropriate message and...
-
Communication is very important in work life especially when managing projects and employees that differ in age and backgrounds. One instance where communication was important was when I had an older...
-
A cousin lives in another country, and they have launched a new line of purses. The purses have a unique logo hand stamped in each one. A year later, you see the same purses with the same hand stamp...
-
Please discuss some the issues that are related to the failure of an employer to adequately do a proper background check of a future employee. If you were an employer, what would be your biggest...
Study smarter with the SolutionInn App