Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ilame. 7.(10 pts) Show what is printed by the following program: /* problem 7*/ public class problem7 { public static void main(String[] args) { int

image text in transcribed
Ilame. 7.(10 pts) Show what is printed by the following program: /* problem 7*/ public class problem7 { public static void main(String[] args) { int x, y, r= 30; String str; str = "Mark Twain"; x=-10; y=-5; System.out.println (str + " " + x +""+y+""+r); y = mymethod(str, x,y); System.out.println (str + " "+x+""+y+""+r); str = "Tom Sawyer"; x= 5, y = 10; System.out.println (str +""+x+""+y+" " + r); y = mymethod(str, x,y); System.out.println (str + " "+x+""+y+""+r); public static int mymethod(String mystr, int p, int q) the third time soon int r; alue RCA mystr = "Tom Sawyer";bebes the corrected q=Math.abs(9) + 5; p= 10 - p; r=q-p; System.out.println (mystr + " "+p+""+q+""+r); return r

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

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

Why could the Robert Bosch approach make sense to the company?

Answered: 1 week ago