Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 1 displays false and Program 2 displays false Analyze the following code: public class Test { public static void main(String[) args) { new B();

image text in transcribed

Program 1 displays false and Program 2 displays false Analyze the following code: public class Test { public static void main(String[) args) { new B(); } } class A { int i = 7; public A() { System out. println("i from A is" + i), } public void set 1(int i) { this i = 2"i; } } class B extends A { public B() { set(20); // System out println("i from B is" + i); } public void set1 (int i){ this i = 3"i; } } A. The constructor of class A is not called. B. The constructor of class A is called and it displays "i from A is 7". C. The constructor of class A is called and it displays "i from A is 40". D. The constructor of class A is called and it displays "i from A is 60". A final class can be extended. True False The UML uses___before a member name to indicate that the member is package private. A. + B. - C. # D. none (blank) A final class can have instances. True False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions