Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

 

7. (10 pts) Show what is printed by the following program: /* problem 7 */ public class problem? { } 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) { int r; game counts 35% and the third game co gameAvg mystr = "Tom Sawyer"; the bowl's ID, the corrected gas gq=Math.abs(q) +5; p=10-p; r=q-p; and a om character ranking System.out.println (mystr +" "+p+" "+q+" "+r); return r; } 150.199 (for Excellent) A (for Average) 100.149 0.99 B (for Beginner R for Rookie)

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

Programmers Guide To Java SE 8 Oracle Certified Associate OCA

Authors: Khalid Mughal, Rolf Rasmussen

1st Edition

0132930218, 978-0132930215

More Books

Students also viewed these Programming questions