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

Computer Science Test Questions and Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
09-01-2026
Written in
2025/2026

Computer Science Test Questions and Answers

Institution
Computer Science
Course
Computer Science









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

Written for

Institution
Computer Science
Course
Computer Science

Document information

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

Subjects

Content preview

Computer Science Test Questions and Answers
/* - ANSWER-This marks the beginning of a multiline comment.

/n - ANSWER-Which of the following is an example of an escape sequence?
/n
while
main
Scanner

= is a Simple assignment operator while == is Equal to. - ANSWER-Explain how = is
different than ==.

1 less than the number of elements - ANSWER-The last subscript in an array list is
always what?

19 - ANSWER-How many times will the body of the loop execute?
for (int i = 1; i < 20, i++)
{
System.out.println ( i )
}

2D Array - ANSWER-If you have data that can be visualized in a table with rows and
columns, you should use a _______.

9 - ANSWER-How many times will the body of the loop execute?
for (int i = 1; i < 10, i++)
{
System.out.println ( i )
}

A declaration opens up a space for a value in the computer's memory and an
assignment fills it with a value.
Declaration: Int Example;
Assignment: Example = #; - ANSWER-What is the difference between a declaration and
an assignment? Give examples.

Accessor, Mutator - ANSWER-A no-arg constructor is usually accompanied by a
_______, _______ method(s)).

Accumulating - ANSWER-This term us used to describe variables that keep a running
total of something.

all of the above (dependent on type) - ANSWER-Default constructors set all object's
variables to _____.
o

, o.o
null
all of the above (dependent on type)

An object is created with a constructor to perform certain tasks or hold data while a field
is the data a object holds. - ANSWER-What is the difference between an object and a
field.

Argument - ANSWER-A(n) ________ is a value that is passed into a method.

Binding - ANSWER-When you have more than one method or variable with the same
name, you can solve it with ____.

Constructor - ANSWER-A bit of code that allows you to create objects from a class.

count == 1 - ANSWER-Which of the following does not change the value of a variable?
count++
count == 1
count += 1
count = 1
count = count + 1

Default Constructors are provided by Java and sets all object's variables to the default
value. A no-arg constructor is made by the programmer and does not take in all
arguments. - ANSWER-Difference between a default Constructor and a no-arg
Constructor.

Event Listener - ANSWER-Graphical components like a JButton or JTextField are
examples of a(n) _______.

Extends - ANSWER-______ is used in a class definition when establishing an is-a
relationship.

Field - ANSWER-A class, interface or enum associated with a value are examples of a
_____.

Final - ANSWER-This is a keyword used when declaring a variable which cannot be
changed.

Free - ANSWER-Free Question Type "Free"!

Inheritance - ANSWER-What combines a Subclass with a superclass.

JFrame - ANSWER-A top-level window with a title and a border. The size includes any
area designated for the border.

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.
CLOUND Exam
View profile
Follow You need to be logged in order to follow users or courses
Sold
605
Member since
2 year
Number of followers
389
Documents
11040
Last sold
1 day ago
PROF MM

HELLO WELCOME TO THIS PAGE WHERE YOU WILL FIND ALL EXAMS ,STUDY GUIDE ,CASE, TESTBANKS AND ANY OTHER STUDY MATERIALS,

3.9

116 reviews

5
58
4
16
3
29
2
3
1
10

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