Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

46 What is the output of the folowing code? public class Test public static void

ID: 3808784 • Letter: 4

Question

46 What is the output of the folowing code? public class Test public static void mainstringO args) l String sl new Strang(Java); String s newSt System out print((s1 s2 (st equals(s20). A false false C B true true C. false true D, true false Encapsulation means CA that data fields should be declared private that a class can extend another class r C. that a variable of supertype can refer to a ubtype object C D, that a class can contain another class In OOP, a reference variable can reference a subtype object This is called CA encapsulation B. inheritance C, polymorphism D, abstraction

Explanation / Answer

Question 46:

Answer is : false true

to compare string use (s1.equals(s2))

Question 47:

Answer is : that data fields should be declared private

Declare the variables of a class as private.

Question 48:

Answer : polymorphism

Question 54:

Answer : The constructor of class A is called and it displays i from A is 7

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote