Question: in java * Question Completion Status: What is the output of the Tester class below? public class Account{ private int balance; private int accNum; public
* Question Completion Status: What is the output of the Tester class below? public class Account{ private int balance; private int accNum; public Account(int num) accNum = num; balance = 0; 3 public Account(Account other) this.accNum=other.accNum: this.balance=other balance: } public void setBalance(int balance) { this.balance = balance; } public String toStringo return "Account: " + accNum +", " + balance + " dirhams": 1 } public class Tester public static void main(String O args) Account a1 = new Account(5431); a1.setBalance(2500); Account a2 = a 1: a2.setBalance(300); System.out.println(al): System.out.println(a): } For the toolbar press ALT-F10 (PC) or ALT-FN-F10 (Mac), BIUS Paragraph
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
