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% (3 reviews)
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...
-
Respond to this observation in the context of investment decisions: Estimating future cash flows is a nightmare compared to measuring the cost of capital.
-
E 22-7 Net assets classification Brotherhood, a religious organization, received funds and gifts in the form of: 1. Donations by members Accounting for Not-for-Profit Organizations 769 2. Donations...
-
We wish to estimate the value of Portal Inc. under alternative assumptions about the firm's performance. a. Using the discounted cash-flow (DCF) approach to valuation and the follow ing assumptions,...
-
Cuando escuchas la palabra contabilidad, qu ideas te vienen inmediatamente a la mente? Cmo describira a los contadores? Qu es lo que ms te preocupa de tomar un curso de contabilidad? Explique cmo...
-
The House of Commons Committee of Public Accounts produced a report on the budget for the London 2012 Olympic and Paralympic Games, to investigate the reasons for budget increases announced by the...
-
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...
-
Find the limit L. Then use the - definition to prove that the limit is L. lim x-5 |x - 5|
-
Find derivative of arcsin x
-
1. Examine the impact of feedwater heater pressure on cycle efficiency and determine the intermediate pressure for optimal performance for one heater.
-
3. Environmental impact of adding feedwater heaters
-
1. Discuss the importance of genetic diversity in fish populations. 2. a) Habitat restoration and connectivity in population conservation is faced with many challenges. Discuss (5 marks) b)a) ...
-
1. Assumethatlengthin Oreochromis variabilis (Victoria Tilapia) ispolygenicvaryingfrom30cmto50cm. A 30cm purebred parent is crossed with another purebred 50 cm individual and the resulting F 1...
-
Explain the difference between a shortened and complete form of an issue. Which is most import at this stage of drafting? Why?
-
Making use of the tables of atomic masses, find the velocity with which the products of the reaction B10 (n, ) Li7 come apart; the reaction proceeds via interaction of very slow neutrons with...
-
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...
-
A proposed $2.5 M investment in new equipment at a 100 MG/y M&Ms factory will save the plant $800,000/y in energy costs. Assuming an annual interest rate of 5%/y (compounded annually), and an...
-
Brief Exercise 10-7 Coronado Company obtained land by issuing 2,250 shares of its $14 par value common stock. The land was recently appraised at $103,240. The common stock is actively traded at $44...
-
The following schedule reconciles Cele Co.'s pretax GAAP income Pretax GAAP income Nondeductible expense for fines Tax deductible depreciation in excess of GAAP depreciation expens Taxable rental...
Study smarter with the SolutionInn App