Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

PRO192-CMS Final Exam Questions and All Correct Answers Updated.

Rating
-
Sold
-
Pages
19
Grade
A+
Uploaded on
15-03-2026
Written in
2025/2026

Consider the two methods (within the same class) public static int foo(int a, String s) { s = "Yellow"; a=a+2; return a; } public static void bar() { int a=3; String s = "Blue"; a = foo(a,s); Sln("a="+a+" s="+s); } public static void main(String args[]) { bar(); } What is printed on execution of these methods? Select one: a. none of the above. b. a = 3 s = Yellow c. a = 5 s = Yellow d. a = 5 s = Blue e. a = 3 s = Blue - Answer d class Point { int x,y; Point (int x, int y) { this.x = x;

Show more Read less
Institution
PRO 192 FULL
Course
PRO 192 FULL

Content preview

PRO192-CMS Final Exam Questions
and All Correct Answers 2025-2026
Updated.
Consider the two methods (within the same class)

public static int foo(int a, String s)

{

s = "Yellow";

a=a+2;

return a;

}

public static void bar()

{

int a=3;

String s = "Blue";

a = foo(a,s);

System.out.println("a="+a+" s="+s);

}

public static void main(String args[])

{

bar();

}

What is printed on execution of these methods?

Select one:

a. none of the above.

b. a = 3 s = Yellow

c. a = 5 s = Yellow

d. a = 5 s = Blue

e. a = 3 s = Blue - Answer d



class Point {

int x,y;

Point (int x, int y) {

this.x = x;

,this.y = y;

}

public String toString() {

return "Point[" +x+ "," +y+ "]";

}

}

public class Main{

public static void main (String args[]) {

Point p = new Point (10,20);

System.out.println("p=" +p);}

}

What is the output of the following code? - Answer a



A process that involves recognizing and focusing on the important characteristics of a situation
or object is known as:

Select one:

a. Encapsulation

b. Object persistence.

c. Abstraction

d. Polymorphism

e. Inheritance - Answer c



Consider the following variable declarations:

int i;

float j;

boolean k;

Which of the following is correct initialization?

Select one:

a. i = 1; j = 1.0f; k = "true";

b. i = 1; j = 1.0; k = true;

c. i = 1; j = 1.0; k = "true";

d. i = 1; j = 1.0f; k = True;

e. i = 1; j = 1.0f; k = true; - Answer e



Which of these are legal identifiers.

, Select one:

a. All of the above.

b. number_1

c. $1234

d. number_a - Answer a



Analyze the following code.

public class Test {

public static void main(String[] args) {

System.out.println(max(1, 2));

}

public static double max(int num1, double num2) {

System.out.println("max(int, double) is invoked");

if (num1 > num2)

return num1;

else

return num2;

}

public static double max(double num1, int num2) {

System.out.println("max(double, int) is invoked");

if (num1 > num2)

return num1;

else

return num2;

}

}

Select one:

a. The program cannot compile because you cannot have the print statement in a non-void
method

b. The program cannot compile because the compiler cannot determine which max method
should be invoked

c. The program runs and prints "max(int, double) is invoked" followed by 2.

d. The program runs and prints 2 followed by "max(double, int)" is invoked

e. The program runs and prints 2 followed by "max(int, double)" is invoked - Answer b

Written for

Institution
PRO 192 FULL
Course
PRO 192 FULL

Document information

Uploaded on
March 15, 2026
Number of pages
19
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TestSolver9 Webster University
Follow You need to be logged in order to follow users or courses
Sold
925
Member since
2 year
Number of followers
127
Documents
29533
Last sold
19 hours ago
TESTSOLVER9 STORE

TOPNOTCH IN LEARNING MATERIALS,(EXAMS,STUDYGUIDES NOTES ,REVIEWS,FLASHCARDS ,ALL SOLVED AND PACKAGED.OUR STORE MAKE YOUR EDUCATION JOURNEY EFFICIENT AND EASY.WE ARE HERE FOR YOU FEEL FREE TO REACH US OUT .

3.5

159 reviews

5
67
4
20
3
28
2
15
1
29

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions