Computers and Technology

What is the output of following program: public class test { public static void main(string[] args) { a a = new a(); a. methodb(); } } class a { public a() { system. out. println("a's constructor is executed"); } public void methoda() { system. out. println("methoda is executed"); } public void methodab() { system. out. println("a's methodab is executed"); } } class b extends a { private int num = 0; public b() { super(); system. out. println("b's constructor is executed"); } public b (int n) { num = n; system. out. println("b's constructor is executed"); } public void methodb() { system. out. println("num is " + num); system. out. println("methodb is executed"); } public void methodab() { system. out. println("b's methodab is executed"); } }

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:00, michelle7511
Which database model is best used for data warehouse and data mining
Answers: 3
image
Computers and Technology, 22.06.2019 14:30, qxchung7310
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, mjweed2456
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
Do you know the correct answer?
What is the output of following program: public class test { public static void main(string[] args)...

Questions in other subjects:

Konu
Mathematics, 29.09.2020 20:01
Konu
Mathematics, 29.09.2020 20:01