Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 Find the output for the below Java program: 1 public class Main 2-{ 3 4 int a=1; 5 int b=5; 6 7. public

image text in transcribed
Question 2 Find the output for the below Java program: 1 public class Main 2-{ 3 4 int a=1; 5 int b=5; 6 7. public void setData(int a ,int b) { 8 a = a; 9 b = b; 10 } 11. public void showData() { 12 System.out.println("Value of A ="+a); 13 System.out.println("Value of B ="+b); 14 } 15. public static void main(String args[]){ 16 Main obj = new Main(); 17 obj.setData(2,3); 18 obj.showData(); 19 } 20 } AWN For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BI U S Par

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

Step: 3

blur-text-image

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago