
Strings and Class Type
Presentation
•
Computers
•
10th - 12th Grade
•
Medium
Alexandra Ulrich
Used 18+ times
FREE Resource
8 Slides • 5 Questions
1
AP CSA

2
Primitive data types only hold one piece of data at a time
3
Multiple Choice
int x=15; is :
primitive type
class type
4
Multiple Choice
True or False: Variables of class data types do not always have to hold a memory location all the time
True
False
5
Naming conventions are similar to those of a variable but a class should begin with a capital letter and reference the purpose of the class.
public class GradePointAvg
{
// statements not shown
}
6
Multiple Choice
Which of the following class declarations would cause a compile-time error? Assume the rest of the code compiles as intended.
public class Science
public class apScience
public class APScience
public class 4APScience
public class APScience extends Science
7
8
greeting = new String("Hello");
You can also use just a string literal, which is a set of characters enclosed in double quotes ("), to create a String object.
greeting = "Hello";
9
This is also called concatenation.
String start = "Happy Birthday";
String name = "Jose";
String result = start + " " + name; // add together strings
10
Multiple Choice
Which of the following statements use string literal?
System.out.print(side1);
System.out.print("side1");
11
Example: If a triangle has a side length of 2 stored in memory using identifies side1 and you eant to ouput that information to the screen you could use either:
System.out.print(2);
System.out.print(side1): //will display the value stored using the side1 identifier
System.out.print("side 1") // will display
12
Multiple Choice
Assuming all other statements in the program are correct, each of the following statements will allow the program to compile EXCEPT:
System.out.print(2);
System.out.print("2");
System.out.print(side1);
System.out.print("side1");
13
(6 min)
https://youtu.be/xqFGn5P1Ho8
AP CSA

Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
10 questions
Hispanic Heritage Month
Presentation
•
10th - 12th Grade
12 questions
AP Computer Science Principles Procedures
Presentation
•
9th - 12th Grade
10 questions
Decision Making
Presentation
•
9th - 12th Grade
10 questions
Subjuntivo
Presentation
•
9th - 12th Grade
10 questions
Poetic Structure
Presentation
•
11th - 12th Grade
11 questions
Multistep Stoichiometry
Presentation
•
10th - 12th Grade
11 questions
MENGENAL SCRATCH (Wahyu Mei Wulandari)
Presentation
•
10th - 12th Grade
12 questions
Empirical Rule
Presentation
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade