100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WLU CP213 QUIZ 1-5 COMBINED Object-Oriented Programming – all with correct marked answers Wilfrid Laurier University

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

WLU CP213 QUIZ 1-5 COMBINED Object-Oriented Programming – all with correct marked answers Wilfrid Laurier University

Institution
WLU CP213
Course
WLU CP213









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WLU CP213
Course
WLU CP213

Document information

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

Content preview

WLU CP213 QUIZ 1-5 COMBINED Object-Oriented Programming – all with
correct marked answers Wilfrid Laurier University

CP213 – QUIZ 1
Java differentiates between how many types of variables?
a) 4, instance, static, local, and parameter variable
b) 3, instance, local and parameter variable
c) 2, instance, static, and local variables
d) Supports only instance variable

If the following code snippet is executed, what will be the output?
public void test3()
{
int i = 50000;
short s = i;
}

a) s will be 50000
b) s will be between -32787 and 32786
c) s will be between -128 to 127
d) The program does not compile.

When the following code snippet is executed, what will be the output?
public void test() {
int input = 7;
int output = ++input + ++input + ++input;
System.out.println(output);
}

a) -20
b) 109
c) 27
d) 35
e) Compilation Error or Runtime Error

When the following code snippet is executed, what will be the output?
public static void test5() {
int i = 4;
int j = 21;

int k = ++i * 7 + 2 - j--;
System.out.println("k = " + k);
}

a) k = 16
b) The program does not compile.
c) k = 11
d) k = 17

In Java static variable is used to
a) refer to common properties to all objects.
b) get a persistent value between different method calls.
c) It gets memory only once in a class area at the time of class loading.
1

, d) All are correct.




2

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.
smartzone Liberty University
View profile
Follow You need to be logged in order to follow users or courses
Sold
3192
Member since
5 year
Number of followers
2291
Documents
14354
Last sold
1 day ago
AMAIZING EDUCATION WORLD

GET ALL KIND OF EXAMS ON THIS PAGE ,COMPLETE TEST BANKS,SUMMARIES,STUDY GUIDES,PROJECT PAPERS,ASSIGNMENTS,CASE STUDIES, YOU CAN ALSO COMMUNICATE WITH THE SELLER FOR ANY PRE-ORDER,ORDER AND ETC.

3.7

584 reviews

5
260
4
93
3
103
2
29
1
99

Recently viewed by you

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

Frequently asked questions