Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What are the values of num 1 and num 2 and result after the execution of mystery ( num 1 , num 2 ) ?

What are the values of num 1 and num 2 and result after the execution of mystery(num1, num2)?
public static int mystery (int firstNum, int secondNum)
{
firstNum = firstNum **2;
secondNum = secondNum **3;
return firstNum + secondNum;
}
public static void main(String[] args)
{
int num1=10;
int num2=11;
int result = mystery (num1, num2);
}
num1=20, num 2=33 and result is 53
num 1=0, num 2=0 and result is 0
num1=10, num 2=11 and result is 53
num1=20, num 2=33 and result is 0
image text in transcribed

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

=+such as the dirigenti in Italy?

Answered: 1 week ago

Question

=+ Are there closed-shop requirements or practices?

Answered: 1 week ago