Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java question can you guys tell me the step how this code execute? public class TraceProgWMethods { public static void main(String[ ] args) { String

java question

can you guys tell me the step how this code execute?

public class TraceProgWMethods {

public static void main(String[ ] args) {

String message = "Guess what";

int a = 5, b = 7, c = 6;

double y = 6.4;

what1(b, c);

y += what2(message, a);

System.out.println(message);

System.out.println(b);

System.out.println(c);

System.out.println(y);

}

public static void what1(int num1, int num2) {

int a = 15;

double y = 12.4, z = 9.3;

num1++;

y = a / num2 + num1;

System.out.println(y);

System.out.println(num1);

z = what2("Who knows", num2);

System.out.println(z);

return;

}

public static double what2(String words, int num1) {

double result = 100.5;

System.out.println(words + " number?");

System.out.println("The number is " + num1);

words = "Finished my work.";

result = num1 + 1.2;

System.out.println(words);

return result;

}

}

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions