Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9. What is the output of the following program public class A private int i private int j eOverride public boolean equals (object obj) (

image text in transcribed
9. What is the output of the following program public class A private int i private int j eOverride public boolean equals (object obj) ( return super.equals (obj) public class Driver public static void main String args 1) A obj1new AO A obj2 new AO System. out printiobj 1. equals(obj2)): a. True b. False 10. What will be the output of the following code? public class Complex f private double real; private double imaginary; public String ngtostringreal + this. maginary + "1)"; " return "(.. + this. real + " + " + this .imaginary + "i)"; + + public Complex(int real, int imaginary)t this. real real; this.imaginary imaginary: public class Main f public static void main(String[) args) Complex c1 = new Complex (); Complex c2 new complex (5, 2); System.out.printin(c2.toString)) a. (5 + 2i) b. Complex@124FA2450 c. Compilation Error d. Runtime Error

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_2

Step: 3

blur-text-image_3

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 Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions