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: 0% (1 review)
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...
-
Three points that lie on the same straight line are said to be collinear. Consider the points A(3, 1), B(6, 2), and C(9, 3). If slope of segment AB = slope of segment BC = slope of segment AC, then...
-
Use the general solution in Perry's Chemical Engineers' Handbook (Wankat and Knaebel, 2019, p. 5-47) to solve the problem of a dissolving solid in a concentrated fluid using the known ratio of...
-
Fitness Mania is a small technology start- up company that specializes in personal fitness mobile apps. The three founders have been working hard on the company for the past two years since they...
-
A local Dunkin Donuts franchise must buy a new piece of equipment in 4 years that will cost $ 9 0 , 0 0 0 . The company is setting up a sinking fund to finance the purchase. What will the quarterly...
-
Consider a building with 3200 ft 2 of walls. Assume the ceiling is well-insulated and compute the energy loss through the walls based on the following materials, assuming an indoor temperature of 70...
-
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...
-
Go through the steps in deriving (11.144). LI SR, (r:|H1,) dr SR, (ri ,) dr |P (E\H) = 1 1+; (20E/No) 8. I|
-
How does the risk related to inventory compare among manufacturers, wholesalers, and retailers?
-
What is the primary logic behind potential separation of marketing and logistics channel structure?
-
How could the matrix approach to design be applied to logistics activities?
-
Making a group more homogeneous and smaller are two steps that can group__________ members. a. increase conflict among b. decrease the amount of communication between c. have no effect on d. increase...
-
Why wouldn't a manufacturer desire to always have intensive distribution coverage?
-
Eric Johnson makes billiard balls in his New England plant. With recent increases in his costs, he has a newfound interest in efficiency. Eric is interested in determining the productivity of his...
-
Using the parallel-axis theorem, determine the product of inertia of the area shown with respect to the centroidal x and y axes. 6 in. 9 in. 9 in- 4.5 in. in. 4.5 in.
-
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...
-
In March 2 0 2 2 , major Central Banks worldwide started increasing interest rates resulting in higher Treasury Bill yields and failure of few banks in US ( due to selling of Assets to meet liquidity...
-
Find the present value of an ordinary annuity which has payments of $ 7 0 0 per year for 1 9 years at 5 % compounded annually.
-
c. Use the following template to create a policy that can be used to monitor budget outcomes, analyse variances and the possible causes of variances, and make required changes in response to budget...
Study smarter with the SolutionInn App