Question: Given the code: public class Test1 { private int method1(int x, int y) { return x + y; } private int method2(int x, int y)
Given the code:
public class Test1 { private int method1(int x, int y) { return x + y; }
private int method2(int x, int y) { if (x > y) return x; else return y; }
public static void main(String[] args) { Test1 test1 = new Test1(); System.out.println(test1.method1(test1.method2(3, 5), 10)); } }
What is the output?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
