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
dalvyx [7]
3 years ago
14

What is wrong with line 1?

Computers and Technology
1 answer:
Gelneren [198K]3 years ago
5 0

Answer:

The set is a object of the class 'H' and the setY method is a member of G class which is not called by the object of H class.

Explanation:

  • If a user calls the G function which is not a private by the help of H class objects then it can be called. It is because all the public and protected methods of A class can be accessed by the B class if B extends the A-class.
  • If any class is extended by the other class then the derived class holds the property of the base class and the public and protected method can be accessed by the help of a derived class object.
  • The derived class object can be created by the help of base class like written in the "line 1".
  • But the base class can not call the member of the derived class.
You might be interested in
ANSWER ASAP!!! 12 POINTS!!!!! RIGHT ANSWERS ONLY
suter [353]

Answer:

B.

Explanation:

8 0
2 years ago
Read 2 more answers
Please please help I don’t understand this
garik1379 [7]

Answer:

It is this because yass

Explanation:

And yes

6 0
2 years ago
Read 2 more answers
Consider the following method, remDups, which is intended to remove duplicate consecutive elements from nums, an ArrayList of in
MAXImum [283]

Answer:

B. {1, 2, 2, 3, 3, 4, 5}

Explanation:

Given

The above code segment

Required

Determine which list does not work

The list that didn't work is B.\ \{1, 2, 2, 3, 3, 4, 5\}

Considering options (A) to (E), we notice that only list B has consecutive duplicate numbers i.e. 2,2 and 3,3

All other list do not have consecutive duplicate numbers

Option B can be represented as:

nums[0] = 1

nums[1] = 2

nums[2] = 2

nums[3] = 3

nums[4] = 3

nums[5] = 4

nums[6] = 5

if (nums.get(j).equals(nums.get(j + 1)))

The above if condition checks for duplicate numbers.

In (B), when the elements at index 1 and 2 (i.e. 2 and 2) are compared, one of the 2's is removed and the Arraylist becomes:

nums[0] = 1

nums[1] = 2

nums[2] = 3

nums[3] = 3

nums[4] = 4

nums[5] = 5

The next comparison is: index 3 and 4. Meaning that comparison of index 2 and 3 has been skipped.

<em>This is so because of the way the if statement is constructed.</em>

3 0
3 years ago
Consider an airport security system. Determine the system model considering that there are two classes of customers – regular an
kykrilka [37]

The answer & explanation for this question is given in the attachment below.

4 0
3 years ago
Martin has data in cell E14 and the cell should be blank . He should
pav-90 [236]

The answer is: use the mouse to click on cell E14 and press Delete.

8 0
3 years ago
Other questions:
  • What is returned by the code: range (5, 100, 25) ?
    7·2 answers
  • Write a recursive method public static String reverse(String str) that computes the reverse of a string. For example, reverse("f
    6·1 answer
  • The default setting for a secondary zone's refresh interval is how many minutes
    8·1 answer
  • How to send an email
    7·2 answers
  • Which of the following function declarations correctly expect an array as the first argument?
    12·1 answer
  • An audit trail is a record of how a transaction was handled from input through processing and output
    10·1 answer
  • What is the name of the technology that integrates vast data bases with georeferenced data in order to design, plan, and manage
    5·1 answer
  • Lập trình web truy vấn csdl và hienr thị ra màn hình danh sách các bản ghi
    15·1 answer
  • A machine that converts energy to useful work.
    9·2 answers
  • Becca is working on a program that will store data. The program will need quick access to data and data persistence is not impor
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!