• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

Apcsa Multiple Choice Final Questins

Document preview thumbnail
Preview 2 out of 11 pages

APCSA MULTIPLE CHOICE FINAL QUESTINS

Content preview

APCSA MULTIPLE CHOICE FINAL QUESTINS

Program errors can be caused by
A) Bad Syntax
B) Code that compiles fine but is interpreted differently from what the programmer
intended
C) Code that compiles fine and behaves just as the Programmer intended
D) A& B only
E) A, B, & C
F) None of these cause program errors - Answer -D

What is a "Scanner"?
A) A module in the Java compiler that scans source code for syntax errors.
B)A module in the Java interpreter that scans the current directory for .class files.
C) A library class in the java.util package that helps to read user input from the
keyboard
D) A library class that helps to read command-line parameters in a program - Answer -
C

Consider the following methods:
public void fun(int a, int b)
{
a+=b;
b+=a;
}
What is the output from the following code?
int x=3, y=5;
fun(x, y);
System.out.println(x+""+y);
A) 3 5
B) 3 8
C) 3 13
D) 8 8
E) 8 13 - Answer -A

What value is stored in number by executing the statement number=7/2;? Assume that
number is declared to be an integer number data type.
A) 3.5
B) 3
C) 1
D) 4 - Answer -B

What value is stored in number by executing the statement number=7.0/2.0;? Assume
that number is declared to be a real number data type.
A) 3.5

, B) 3
C) 1
D) 4 - Answer -A

What is the output of the program segment below?
String var1="100"
String var2="200";
System.out.println(var1+var1);
System.out.println(var2+var2);
A)100
200
B)100200
200100
C)100100
200200
D)200
400 - Answer -C

What is the output of the program segment below?
String age="25";
String firstName="John";
String lastName="Doe";
System.out.println(firstName+" "+lastName+" "age);
A)JohnDoe25
B)25JohnDoe
C)John
Doe
25
D) John Doe 25 - Answer -D

Consider the two program segments below
Segmant A Segment B
int a; int a=100;
int b; int b=200;
a=100;
b=200;
What is true about the comparison of these two segments?
A) Segment A is correct and Segment B is not correct.
B) Segment A is incorrect and Segment B is correct.
C) Segment A and Segment B are both correct.
D) Segment A and Segment B are both incorrect. - Answer -C

Consider the following Java program:
//Program Greetings17
public class Greetings17
{

Document information

Uploaded on
November 10, 2025
Number of pages
11
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.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

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.
GEEKA
3.8
(376)
Sold
2223
Followers
1450
Items
62835
Last sold
1 day 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