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
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS SET A.pdf

Document preview thumbnail
Preview 2 out of 5 pages

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS SET A.pdf

Content preview

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS
SET A+
✔✔What will be printed?

int j = 0;
int sum = 0;
for (int i = 0; j < 10; j++) {
sum++;
}
System.out.println(sum); - ✔✔10

✔✔How many times will this loop execute?

for (int x = 5; x >=0; x--) {
...
} - ✔✔6

✔✔Which of the following are characteristics of ArrayLists (select all that apply)? -
✔✔Parameterized types

✔✔Declaring an ArrayList is accomplished by which of the following? -
✔✔ArrayList<String> myList = new ArrayList<String>();

✔✔The number of elements in an ArrayList named myList is found by -
✔✔myList.size();

✔✔Given the following code, how would you add the first element to the ArrayList?

ArrayList<Foo> myList = new ArrayList<Foo>();
Foo f = new Foo(); - ✔✔myList.add(f);

, ✔✔Given an ArrayList of type Bar and of unknown size, how would you remove the
element created by the following statement?

Bar b = new Bar(); - ✔✔if(myList.contains(b)) myList.remove(b);
OR
myList.remove(b);

✔✔Except for classes in the java.lang package, you always have to specify the full
name of every class you want to use in your code. - ✔✔True

✔✔The full name of a class is given by - ✔✔<package_name>.<class_name>

✔✔Which of the following are valid uses of package names? - ✔✔public
java.util.ArrayList<String> s fred() { ...}
OR
import java.util.ArrayList; public class myClass { ... ArrayList<String> s = new
ArrayList<String>; ... }

✔✔ A java class is - ✔✔a blueprint for creating objects

✔✔In object-oriented programming we - ✔✔model real-world "things" or projects in
code

✔✔Javac is a - ✔✔complier

✔✔The hierarchy of code elements in Java is - ✔✔Source -> Class -> Method ->
Statement

✔✔Considering how parameters are used in methods, Java passes everything by -
✔✔argument

✔✔The maximum number of values a method is allowed to return is - ✔✔one and only
one

✔✔The Java equivalent of cout is - ✔✔System.out.println(...);

✔✔In Java, a class - ✔✔defined the operations an object can perform and the
information that object "knows"

✔✔In Java, everything goes in a class - ✔✔True

✔✔In a Java class, the name of a method that can be executed is - ✔✔main

Document information

Uploaded on
August 6, 2026
Number of pages
5
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$18.99

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

Sold
1
Followers
2
Items
4807
Last sold
1 month ago



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