=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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 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 p

Post by answerhappygod »

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 1
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 1 (39.41 KiB) Viewed 34 times
=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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply