=i; Q2)What is the output of the following program B) this.value= = 1; C) value = 1)public class test{ 1; static int i p
Posted: Mon Jun 06, 2022 11:29 am
=i; Q2)What is the output of the following program B) this.value= = 1; C) value = 1)public class test{ 1; static int i public static void m(int i) { i += 3; } public static void main(String args[]) { System.out.print(i+ ", "); m(i); System.out.println(i);}} 2) class overload{ int x; double y; void add(int a, int b) {x=a+b; void add(double c, double d) {y=c+d; }} public class oveload methods {public static void main(String[] args) { overload obj=new overload(); int a=3; double b=4.2; obj.add(a, a); "+obj.y); System.out.println(obj.x+" obj.add(b, b); System.out.println(obj.x+" "+obj.y); "+obj.y);}} obj.add(a, b); System.out.println(obj.x+" ++ S D) Both (B) and (C)