0% found this document useful (0 votes)
25 views2 pages

Q3 Exam Reviewer A

This document appears to be a practice exam or quiz for a programming course. It contains 25 multiple choice questions testing concepts like variable scope, constructors, methods, parameters, classes, access specifiers, strings and more. The questions have 4 possible answers labeled A-D and are testing the student's knowledge of foundational Java programming concepts.

Uploaded by

gloriakellyann25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Q3 Exam Reviewer A

This document appears to be a practice exam or quiz for a programming course. It contains 25 multiple choice questions testing concepts like variable scope, constructors, methods, parameters, classes, access specifiers, strings and more. The questions have 4 possible answers labeled A-D and are testing the student's knowledge of foundational Java programming concepts.

Uploaded by

gloriakellyann25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PROGRAMMING

2nd Semester
3rd Quarter

Name: _________________________ Date: ______________

Section: ________________________ Score: _____________

1. When a local variable has the same name as a field, what does the local
variable’s name do to the field’s name?
A. shadows C. deletes
B. complements D. merges with

2.If you do not write a constructor for a class, what is automatically provided for the
class?
A. accessor method C. default constructor
B. default instance D. predefined constructor

3.String and System classes are what part of this package?


A. java.io C. java.lang
B. java.util D. java.net

4.Two or more methods in a class may have the same name, as long as what
should be different?
A. their return values C. their parameter list
B. their access specifier D. their memory address

5.What is the process of matching a method call with the correct method known
for?
A. matching C. linking
B. binding D. connecting

6.A class's responsibilities are which of the following?


A. the objects created from the class C. actions the class performs
B. things the class knows D. both b and c

7.Which of the following is the correct syntax for writing a method with parameters?
A. public static void example (x: int, y: int) {} C. public static void example (x, y) {}
B. public static void example (int x, int y) {} D. public static void example (int x,y) {}

8.Why do we use methods in Java programming?


A. break down our program into smaller parts C. avoid repeating code
B. make our program more readable D. all of the above

9.What are parameters?


A. the value that a method returns
B. the type that is given to a variable
C. the values that a method prints to the screen
D. the formal names given to the data/variables that are passed into a method

10.How many characters does ASCII contain?


A. 256 C. 128
B. 127 D. 265

11. When this access specifier is applied to a class member, the member cannot be
accessed by code outside the class. What is this access specifier?
A. public C. void
B. private D. protected

12. Which of the following a class is analogous to?


A. blueprint C. architect
B. house D. attribute

13. An object is which of the following?


A. blueprint C. variable
B. attribute D. instance
14. What is a member of a class that holds data?
A. method C. field
B. instance D. constructor

15. UML stands for which of the following?


A. Universal Modeling Language C. Unified Modeling Language
B. Unified Model Language D. Unicode Modelling Language

16. What key word causes a value to be sent back from a method to the statement
that called it?
A. send C. value
B. return D. public

17. Which method gets a value from a class’s field, but does not change it?
A. accessor C. void
B. constructor D. mutator

18. What method stores a value in a field or in some other way changes the value of
a field?
A. accessor C. void
B. constructor D. mutator

19. When the value of an item is dependent on other data, and that item is not
updated when the other data is changed, what has the value become?
A. bitter C. asynchronous
B. stale D. moldy

20.Which method of a class does not have any return type—not even void?
A. accessor C. mutator
B. void D. constructor
21.What does ASCII stand for?
A. American Symbol Code For Information Interchange
B. American Sales Code For Corrupt Information Interchange
C. American Standard Code For Information Interchange
D. American Standard Code For Informational Interchange

22.A constructor has which of the following?


A. always accepts two arguments C. has the same name as the class
B. has the return type of void D. always has a private access specifier

23.The first position in a String?


A. position 0 C. position 2
B. position 1 D. position 3

24.What is a return value?


A. The value that a method prints to the screen.
B. The value that is inputted to a method.
C. The value that a user inputs to a program.
D. The value that a method outputs.

25.If a class is named Student, the class constructor name is?


A. Student(0) C. Student(new Student)
B. Student() D. Student([])

You might also like