Look at the following code:
Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public void method1(int a){}
Line 5 }
Line 6 public class ClassB extends ClassA
Line 7 {
Line 8 public ClassB(){}
Line 9 public void method1(int x){}
Line 10 }
Line 11 public class ClassC extends ClassB
Line 12 {
Line 13 public ClassC(){}
Line 14 public void method1(int y){}
Line 15 }
Which method (line number) will be executed as a result of the following statements?
ClassB item1 = new ClassA();
item1.method1(5);

Answers

Answer 1

Answer:

The answer is "There is an error, that's why the program will crash".

Explanation:

In the given program code, three class  "A, B, and C" is defined, and inside the code, all class constructor and a method "method1" is defined, that uses an integer variable in its parameters.

At the last line class B object "item1" is created, that holds the class A instance, and in the next step, method1 is called by accepting integer value. when we create the class B object and convert it into ClassB. it is not possible that's why it will give an error.

Related Questions

A={a,b,c,d} B={p,q,r,s} find the value of A-B and B-A​

Answers

Answer:

a-b=(a,b,c,d)

b-a=(p,q,r,s)

What is a command-line interactive scripting environment that provides the commands for almost any management task in a Windows Server 2016 environment?

Answers

Answer:

kqwbxskwsxe

Explanation:

menb dhj

Which of these jobs would be most appropriate for someone who majors in information technology? managing a database for a large department store developing new computing technology that will someday improve network speeds managing the computer network for a large department store designing the hardware for a military helicopter's on-board computer

Answers

Answer:

A

Explanation:

managing the computer network for a large department store

The job that would be most appropriate for someone who majors in information technology is to manage the computer network for a large department store. Thus, the correct option for this question is C.

What is Information technology?

Information technology may be defined as a broad study of a system and network that uses the computer's hardware, software, services, and supporting infrastructure in order to manage and deliver information using voice, data, and video.

So, the job associated with information technology may require the significant utilization of computers and networks over a huge range of numbers. Managing a database is the work of software engineers, designing the hardware for a military helicopter's onboard computer is the work of hardware engineers, etc.

Therefore, the job that would be most appropriate for someone who majors in information technology is to manage the computer network for a large department store. Thus, the correct option for this question is C.

To learn more about Information technology, refer to the link:

https://brainly.com/question/4903788

#SPJ5

You are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you report this fraud and waste through appropriate channels, you may receive protection under the Presidential Policy Directive 19 (PPD-19), Protecting Whistleblowers with Access to Classified Information.A. TrueB. False

Answers

Answer:

A. True.

Explanation:

In this scenario, you are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you report this fraud and waste through appropriate channels, you may receive protection under the Presidential Policy Directive 19 (PPD-19): Protecting Whistleblowers with Access to Classified Information.

In USA, the Presidential Policy Directive 19 (PPD-19) which was signed by President Barack Obama in October 2012, is an executive order designed to provide significant protection for an employee who have access to classified informations such as fraud, waste of money and abuse or prohibiting any form of retaliation against this cleared employee.

Think about some of the most memorable and forgettable games ever created. They can be games that were
discussed in this unit or otherwise. What are some of the consistent factors that made certain games
memorable to you? What were some of the consistent factors that made certain games forgettable to you?
Why? Explain.

Answers

Answer:

There can be many reasons.

Explanation:

1) Unforgettable story

2) The scenery is soooo good (for example, Legends of Zelda : Breath of the Wild)

3) The meaning behind the game.

4) Why the game was created caught your attention

Hope I helped!

A(n) __________ item is a hardware or software item that is to be modified and revised throughout its life cycle.

Answers

Answer: configuration

Explanation: hardware also known as a software.

Answer: configuration

Explanation: hardware also known as a software.  

helping is caring :)

An essential skill today is knowing how to cite sources properly. Creative Commons has a system of licenses and tools for creators to retain copyright while allowing others to:

Answers

Answer:

Copy, distribute, and remix

Explanation:

Creative Commons is not for profit international network and organisation with head quarters in America that enables the discovery of material that are openly licensed so as to be available for use by others fostering the possibility to gain educational insight to creative works to serve as foundation for their own works legally. Creative Commons provide CC licences that are accessed by content creators with a desire to share their creativity on the web.

A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail store or the buyer, 3 of the computers in stock have defective hard drives. Assume that the computers are selected at random.
(a) In how many different ways can the 4 computers be chosen?
(b) What is the probability that exactly one of the computers will be defective?
(c) What is the probability that at least one of the computers selected is defective?

Answers

Answer:

a. 1365 ways

b. Probability = 0.4096

c. Probability = 0.5904

Explanation:

Given

PCs = 15

Purchase = 3

Solving (a): Ways to select 4 computers out of 15, we make use of Combination formula as follows;

[tex]^nC_r = \frac{n!}{(n-r)!r!}[/tex]

Where [tex]n = 15\ and\ r = 4[/tex]

[tex]^{15}C_4 = \frac{15!}{(15-4)!4!}[/tex]

[tex]^{15}C_4 = \frac{15!}{11!4!}[/tex]

[tex]^{15}C_4 = \frac{15 * 14 * 13 * 12 * 11!}{11! * 4 * 3 * 2 * 1}[/tex]

[tex]^{15}C_4 = \frac{15 * 14 * 13 * 12}{4 * 3 * 2 * 1}[/tex]

[tex]^{15}C_4 = \frac{32760}{24}[/tex]

[tex]^{15}C_4 = 1365[/tex]

Hence, there are 1365 ways

Solving (b): The probability that exactly 1 will be defective (from the selected 4)

First, we calculate the probability of a PC being defective (p) and probability of a PC not being defective (q)

From the given parameters; 3 out of 15 is detective;

So;

[tex]p = 3/15[/tex]

[tex]p = 0.2[/tex]

[tex]q = 1 - p[/tex]

[tex]q = 1 - 0.2[/tex]

[tex]q = 0.8[/tex]

Solving further using binomial;

[tex](p + q)^n = p^n + ^nC_1p^{n-1}q + ^nC_2p^{n-2}q^2 + .....+q^n[/tex]

Where n = 4

For the probability that exactly 1 out of 4 will be defective, we make use of

[tex]Probability = ^nC_3pq^3[/tex]

Substitute 4 for n, 0.2 for p and 0.8 for q

[tex]Probability = ^4C_3 * 0.2 * 0.8^3[/tex]

[tex]Probability = \frac{4!}{3!1!} * 0.2 * 0.8^3[/tex]

[tex]Probability = 4 * 0.2 * 0.8^3[/tex]

[tex]Probability = 0.4096[/tex]

Solving (c): Probability that at least one is defective;

In probability, opposite probability sums to 1;

Hence;

Probability that at least one is defective + Probability that at none is defective = 1

Probability that none is defective is calculated as thus;

[tex]Probability = q^n[/tex]

Substitute 4 for n and 0.8 for q

[tex]Probability = 0.8^4[/tex]

[tex]Probability = 0.4096[/tex]

Substitute 0.4096 for Probability that at none is defective

Probability that at least one is defective + 0.4096= 1

Collect Like Terms

Probability = 1 - 0.4096

Probability = 0.5904

Jack needs to email two documents to a friend, but the files are so large his email server bounced them back as undeliverable. What is your advice?

Answers

first try to do one at a time and if they are both too large he can send them through softwares like google drive that let you have large amounts of storage with your files

You need to install several USB devices on a server. You have been asked to attach USB hubs to the computer. Only one USB port is available. How many hubs can you daisy chain using the single port?

Answers

Answer:

5 Hubs

Explanation:

Only up to 5 hubs you can have connected without problems.

Choose the wrong statement. Proper pagination is required for the overall good performance of a domain in search results Pagination is extremely important in e-commerce and editorial websites It is important to have all sub-pages of a category being indexed rel=next and rel=prev attributes explain to Google which page in the chain comes next or appeared before it

Answers

Answer:

The wrong statement in this question is "It's important to have all sub-pages of a category being indexed".

Explanation:

In the given-question, the above choice is incorrect because  all subpages in such a segment are not important to also be indexed, and the other correct choice can be defined as follows:

For both the total good performance of even an area in search engine results, acceptable pagination is required.  rel = next and prev, values are an attribute, that describes its page throughout the chain next to it and originally shown by Google.  Throughout e-commerce as well as publishing internet sites, scrollbars are extremely important.  

A Transmission Control Protocol (TCP) connection is established and two devices ensure that they're speaking the same protocol. What has occured?
A. Three-way handshake
B. Two-way handshake
C. Handshake
D. Four-way handshake

Answers

Answer:

The correct option is;

A. Three-way handshake

Explanation:

For establishment of connection within Transmission Control Protocol, (T. C. P.), involves a three-way way handshake. Prior to attempting a server connection, the server to which connection is sought passively opens a port by listening at the port. Upon establishment of passive open, active open by the client can then be initiated by the client. A connection establishment requires a three-way handshake as follows;

1. The client sends a SYN to the server

2. The server responds by sending a SYN-ACK

3. The client further responds sending ACK back to the server.

Word processing is the use of computer software to enter and edit text.

Answers

Answer:

True

Explanation:

Word processing software or word processing program handles functions related to entering and editing text in a text document. In essence a word processor processes text documents which includes processing entire papers, paragraphs, pages. With a word processing software text is entered  in the document mainly through typing in the letters with a keyboard and a word processor allows copying, deleting and formatting text through the use of built in commands

Examples of word processing programs are Microsoft Word, AppleWorks and OpenOffice.

Which statement best describes an academic goal?

Answers

Answer:

Explanation:

Hila gets good grades and works hard to finish first in class.

Hope this helped you!

Answer:

Hila gets good grades and works hard to finish first in class.

Hope this helped you!

Explanation:

01000001 01101110 01110011 01110111 01100101 01110010 00100000 01101001 01110011 00100000 00110100 00110010 00101110 There's a way to make this meaningful; find it!

Answers

Answer:

Binary Code

Explanation:

I believe this is Binary code, so if you enter this in Google, click a translator from binary code to text, and it should tell you.

when I did it, it said "Answer is 42"

Hopefully this helped any.

The next thing Maia wants to do is to indent the first line of her paragraphs.
How does she do this?

Answers

Answer:

She moves the first-line indent marker to the right.

Explanation:

Answer: d the first-line indent to the right

Explanation:


Convert 30 to hexadecimal ​

Answers

Answer:

1E

Explanation:

Here is a table to help you. Similar to a multipication table, just follow either the number 3 down to A (aka 10) or 6 x 5 and you will find your answer of

1E = 30

qbasic write a program to input number of keyboard to purchase and display the total amount to be paid for with dry run and output step by step​

Answers

Answer:

DIM cost, amount

cost=8

INPUT "How many do you want to purchase";amount

PRINT "Total cost: ";amount*cost

Explanation:

What do you mean by dry run?

how do you think someone has programmed computer calculator?​

Answers

Answer:

Originally, calculator programming had to be done in the calculator's own command The most basic calculations are addition, subtraction, multiplication, and division. The more transistors an integrated circuit has, the more advanced mathematical functions it can perform.


The house had a wonderful pool of ... (his/its/our) own.​

Answers

Answer:

its

Explanation:

"It" used in a number of different forms of sentences and has several rules. 'It' can be used in a sentence either for a Subject or an Object. It can be used as an introductory word in a sentence when there is no mention of the subject. It used for the singular, third-person pronoun. While it has many uses and according to the question, it is used to refer to a lifeless object (home).

janice has set her camera for f/4 but is trying to decide if she should switch to f/8
a. a larger aperture and smaller depth field
b. a smaller aperture and greater depth field
c. a smaller aperture and smaller depth of field
d. a larger aperture and greater depth of field

Answers

Answer:

b

Explanation:

cuz the smaller apeture and greater depth field would be better

Answer:

B a larger aperture and smaller depth of field

Explanation:

EDGE 2022

give brainliest if you tell me the can tell me the most random thing

Answers

Mood

Explanation:

Because it gets changed by the time you are happy or sad. Same that while you are reading if you like your. mood gets good but if you dont find this ans satisfied your mood gets changed.

Distinguish between the savings and investment options.
Savings
Investments
mutual hd
money market
gold
certificate of deposit
account​

Answers

Answer:

Savings,                          Investments

[tex]{}[/tex]Certificate of deposit    Mutual fund

[tex]{}[/tex]Account                         Money Market

[tex]{}[/tex]                                        Gold

Explanation:

Savings is the term used to describe the proportion of ones income not spent or kept for spending at a much later date;

Saving methods includes saving money in deposit accounts, pension savings, and cash savings as well as reducing expenditures

Savings differs from investment in the sense that investments involves more risks than savings

Mutual fund

Mutual fund is a financial resource type involving the bringing together of funds gathered from several investors for investment

Money market

The money market involves buying and selling debt investments that are short terms

Gold

Gold investment is a way of diversifying risk through futures and derivatives and futures contracts

Certificate Deposit

Certificate deposit is a fixed term deposit form of savings that provides an interest on the deposit

Account

Savings and current account are meant for saving funds

List some good names for devices on your home network or on the network in your school's lab. Demonstrate the use of best practices when creating a naming scheme for devices on a computer network.

Answers

Answer:

Following are the answer to this question:

Explanation:

The following is the list of name devices, which is used home network or the school lab.

hrtr01(home router 1). schadmrtr02(school building router 2). clpc01, and clpc02 (computer laboratory pc 1 and 2) .

Uses:

Its use as descriptive names as necessary without gives potential hacks much more relevant data.  It provides only areas that are essential for both device identification.  It allows the name for irrelevant or redundant information doesn't over-complicated.

Robert complains that the cursor on his laptop screen often jumps around unexpectedly when he’s typing. What can he do to solve the problem?

Answers

Answer:

Disable the touchpad

Explanation:

Once you have a listing of every unique combination of salesperson, product and location, what Excel function would you use to compute the total sales for each combination of salesperson, product and location

Answers

Answer:

SUMIFS

Explanation:

As we know that the excel is used to present the data in a very attractive way by applying the formulas, pie charts, functions as a pivot table, goal seeking, macros, etc

In order to determine the total sales for each and every sales person, production and location combination we use the SUMIFS function so that the total of each column could come in an easiest and better way

If you were doing a regular expression inside a Linux command line, which special character on the keyboard would give you two possible matches using the example below: car ____ truck

Answers

Answer: car | truck

Explanation: The pipe (|) symbol used can be used in regular expression to simply imply OR. This means when used in between expression, can be used to search for all matches of the strings in which it stands in between. In the scenario above, If the pipe symbol is located in between the two strings, such as [ cars | trucks], the expression returns possible occurrence of the strings cars and trucks. It may also be used to locate and return the occurrences of more than 2 strings, such as; string1 | string2 | string3

Memory operations currently take 30% of execution time of program A. A new widget called a "cache" speeds up 80% of memory operations by a factor of 4. A second new widget called a "L2 cache" speeds up half of the remaining 20% by a factor of 2. What is the total speed up?

Answers

Answer:

The answer is "1.24"

Explanation:

Formula:

[tex]\bold {Speedup= \frac{1}{(1 - non-speedup-portion) +(Speed up portion 1)}+\frac{(speed up-portion \ 2)}{ speedup\ 2}+ ....}\\\\[/tex]Given value:

Operations in the memory = 30%

                                              = 0.3  

80% Memory [tex]= 0.3 \times 80\%[/tex]

                       [tex]=[/tex] [tex]\frac{(0.3 \times 80) }{100}[/tex]

                       [tex]= 0.24[/tex]  

Now it takes 0.06 seconds, saved 0.18 seconds.

20% of the memory operations:

[tex]= 0.3 \times 20\% \\\\= \frac{(0.3 \times 20)}{100} \\\\= 0.06[/tex]

Half of the other 20% = 0.03  

It takes 0.015 seconds now, saved 0.015 seconds, saved 0.195 seconds.  

It takes 0.805 seconds in the 1 second.

[tex]Speedup = \frac{1} {0.7 + 0.3\times \frac{0.8}{4}} + 0.3\times0.2\times\frac{0.5}{2} + 0.3\times0.2\times0.5[/tex]

[tex]Speedup = 1.2422[/tex]

Define a public static method named s2f that takes two String arguments, the name of a file and some text. The method creates the file and writes the text to it. If all goes well the method returns true. If, however, either of its arguments are null or if there is any problem in creating or writin

Answers

Answer:

Java solution (because only major programming language that has public static methods)

(import java.io.* before hand)

public static boolean s2f(String fileName, String text){

   try{

       PrintWriter out = new PrintWriter(new File(fileName));

       out.println(text);

       out.close();

       return true;

   }

   catch(Exception e){

       return false;

   }

}

MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use Excel for personal, work and school purposes? Give an example for all three.

Answers

Answer:

Explanation:

En Google te sale la respuesta fácilmente.

Solo pones la pregunta primero con personales, luego con laborales y así...

Y de luego los ejemplos

Other Questions
How can I identify witch of those numbers dont belong with the other there 50.1 -50 over two -50.1 square root of 50? What new and innovative mechanisms, laws, or practices could corporate America put in place to address the corporate misconduct that we often find in the news Riding in a car or airplane that is made of metal is safer than being outdoors in a lightening storm because the _____. 1.metal surface attracts positive charges. 2.metal surface attracts negative charges 3.metal is neutral 4.tires are made of rubber. C. How do the processes you used forparts A and B differ? How are they the same? How did physical characteristics of the environment influence the location of the settlement at Jamestown? The legal environment for public employees differs from private sector employment because public employees: What is science? APEX A. Attempting to solve ethical problems through research. B. Learning about the physical world through observation. C. Using rules and patterns to predict what will do. D. Determining a body of knowledge that never changes. Nurse Antonio measured out 7 grams of sodium chloride (NaCI). Using dimensional analysis, calculate how many moles of NaCI he weighed out. algebra isnt my best subject, please help Which of the following characteristics of experiments are also characteristics of surveys? Check all that apply. A. Data are gathered during the course of the study. B. The study involves one or more treatment groups and a control group. C. The study compares two or more treatments (possibly including no treatment") D. Replication with different groups of subjects can improve the reliability of the study. E. Statistical analysis is applied to the results of the study. What is the value of 2 over 55ovet42over3 What is the absolute value of -4 can anyone plz help? What should the US have done as worl war || was raging in Europe and Asia? Explain (6+a) divided by 5 -2 Tickets for a concert cost $2 for children, $3 for students, and $4 for adults. Ticket sales totaled $522 and 177 people attended the concert. Twice as many students as adults attended. Find how many of each type of ticket were sold. Assume that everyone who bought a ticket attended the concert. does anyone know this? Which of the following impacts would the colonies have experienced if trade with Europe stopped? a) Fewer trees would be cut down in New England. b) The number of slaves needed in the colonies would increase. c) More varieties of grain would be planted in the Middle Colonies. d) Southern colonies would be unable to gain slaves through triangular trade. simplify the expression. -2 3/5 - (-1 2/5) - 4/5 = ? Can someone tell me a very very simple physics experiment topic that links to biology?