subject

Consider the following classes: public class first { public void method2() { system. out. println("first2"); } public void method3() { method2(); }}public class second extends first { public void method2() { system. out. println("second2"); }}public class third extends second { public void method1() { system. out. println("third1"); super. method2(); } public void method2() { system. out. println("third2"); }}public class fourth extends first { public void method1() { system. out. println("fourth1"); } public void method2() { system. out. println("fourth2"); }}suppose the following variables are defined: first var1 = new second(); first var2 = new third(); first var3 = new fourth(); second var4 = new third(); object var5 = new fourth(); object var6 = new second(); indicate below the output that would be produced by each statement shown. if the statement produces more than one line of output, indicate the line breaks with slashes as in a/b/c to indicate three lines of output with a followed by b followed by c. if the statement causes an error, write the word error to indicate this. var1.method2(); var2.method2(); var3.method2(); var4.method2(); var5.method2(); var6.method2(); var1.method3(); var2.method3(); var3.method3(); var4.method3(); var5.method3(); var6.method3(); ((second) var4).method1(); ((third) var4).method1(); ((second) var5).method2(); ((first) var5).method3(); ((third) var5).method1(); ((first) var6).method3(); ((second) var6).method1(); ((second) var6).method3();

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right answer?
Consider the following classes: public class first { public void method2() { system. out. println("f...
Questions
question
Mathematics, 28.01.2021 22:10
question
Mathematics, 28.01.2021 22:10
question
Mathematics, 28.01.2021 22:10
question
Business, 28.01.2021 22:10
question
Mathematics, 28.01.2021 22:10
question
Physics, 28.01.2021 22:10
question
English, 28.01.2021 22:10
Questions on the website: 13722363