Question: 6. (10 pts) Suppose you have the class whatever, defined below. Suppose a main method runs as follows: public static void main(String[] args) {

6. (10 pts) Suppose you have the class whatever, defined below. Suppose

6. (10 pts) Suppose you have the class whatever, defined below. Suppose a main method runs as follows: public static void main(String[] args) { } Whatever w = new Whatever () ; System.out.println (w.ohReally Now (7)); System.out.println(w.ohReally Now (-5)); System.out.println(w.ohReallyNow (10)); In the box below, write down the output produced. public class Whatever { private int x; public Whatever () { x = 42; } public int ohReallyNow (int y) { int z = y; if (z z < 50) if (z > 0) { z = 0; } else { x = 137; } } return x + z;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!