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 15 pages
Exam (elaborations)

AP Computer Science A Midterm Study Guide Questions Exam With Complete Solutions Graded A+

Document preview thumbnail
Preview 2 out of 15 pages

AP Computer Science A Midterm Study Guide Questions Exam With Complete Solutions Graded A+

Content preview

AP Computer Science A Midterm Study Guide
Questions Exam With Complete Solutions
Graded A+

QUESTIONS AND ANSWERS

How to identify variable and methods? ANSWER -camelCase


How to identify classes? ANSWER -PascalCase


Is double the same as Double? ANSWER -No


What are the members of the Object class? ANSWER -public boolean equals (Object obj);


public String toString( );


How are String objects made using the reserve word "new"? ANSWER -String str = new
String("word");


How are String objects created without using the reserve word "new"? ANSWER -String
str = "word";


What are the two ways to write an output statement and how are they different?
ANSWER -System.out.print( ); - prints the statement and does not move the cursor


System.out.println( ); - prints the statement and then moves the cursor


When is a "+" an addition operator? ANSWER -When it does not follow a String object.


When is a "+" a concatenation operator? ANSWER -When it is preceded by a String
object.

, What does \" output? ANSWER -One double quotation ( " ).


What does \\ output? ANSWER -One backwards slash ( \ ).


What does \n do? ANSWER -Inserts a new line (a line break).


What is == when comparing String objects? ANSWER -It checks to see if two objects
point to the same memory location.


What is .equals( ) when comparing String objects? ANSWER -It checks to see if two
objects hold the same values.


What are the two types of variables? ANSWER -Primitive data types
Object Reference


What are the four primitive data types and what are their default values? ANSWER -
double - 0.0
int - 0
char- null
boolean- false


What are the method headers for the String methods? ANSWER -public int
compareTo(String str);
public int length( );
public int indexOf(String str);
public int substring(int begin);
public int substring(int begin, int end);
public boolean equals (Object obj);
public String toString( ) ;


What are the method calls for the String methods? ANSWER -word1.compareTo(word2);
word1.length( );

Document information

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

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
8
Followers
0
Items
1069
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