Skip Top Navigation Bar
Why Java?
Learner's Corner
Teacher's Corner
Java Playground
Home
Getting Setup
Learn
Practice
Apply
Other Resources
Exploring Java with Practice Activities
1.1 - Working with Data
Introduction to Algorithms Practice
- In this introduction to algorithms practice set, you will practice writing your own algorithms for things that are part of everyday life and then move on to writing comprobable algorithms to a given algorithm.
Classifying Data Practice
- In this activity, you will think about the type of data that is being described and determine whether it is primitive data or object data, identify the specific type of data, and provide a rational for your choice.
Determine if Data is Mutable or Immutable
- In this activity, you will think about all the data that would need to be stored for the described object and determine what of that data would be mutable and what data would be immutable.
Creating Records and Record Objects
- In this activity, you will be creating a new data type in the form of a record. You will then be declaring and initializing new record objects.
Declaring and Initializing Variables
- In this activity, you will determine the data type, variable name, and initial value for described variables. You will also be given some incorrect statements to test in the Java Playgroud and fix them.
Experiment with Arithmetic Basics
- In this activity, we will use the
Java Playground
to practice arithmetic expressions.
Console Input and Output Practice
- In this activity, youwill practice prompting for input, storing these values in variables, and producing output.
Formatting Output Practice
- In this activity, you will practice using escape sequences and text blocks to format output.
Creating Record Objects and Calling Methods
- Practice identifying the instance variables, constructors, and methods of a record and then apply this to creating objects of a records and calling those methods.
Using the Random Class
- Define variables and assign them to randomly generated values using the
Random
class.
Evaluating Expressions that use the String Class
- Evaluate the provided expressions that use the
String
class.
Write Expressions that use the String Class
- Write expressions that use the
String
methods to satisfy provided prompts.
Writing Code that Parses Strings Using the Wrapper Classes
- Write expressions that parse
String
objects to appropriate values using wrapper classes.
Using the LocalDate Class
- Write expressions that use the
LocalDate
class to satisfy provided prompts.
Evaluate Expressions that use the Math Class
- Evaluate the provided expressions that use the
Math
class.
Write Expressions that use Math Class
- Write expressions that use the
Math
methods to satisfy provided prompts.
1.2 Algorithms
Relational Operators
- In this set of practice, you will write statements to assign boolean variables to values based on relational operators. You will also evaluate relational expressions.
Logic Operators
- In this set of practice, you will write statements to assign boolean variables to values based on logic operators. You will also evaluate logic expressions.
Evaluate Expressions that Contain if Statements
- Evaluate the provided expressions that contain
if
statements.
Write Expressions that Contain if Statements
- Write expressions that require the use of
if
statements.
Evaluate Expressions that Use While Loops
- Evaluate the provided code segements that contain
while
loops.
If, Ternary, and Switch Statements
- In this set of materials, you will find a set of 4 practice questions that ask students to write solutions as both if statements and ternary conditional operator expressions.
Exploring the Use of var with the Java Playground
- In this activity, we will explore the different ways
var
can and cannot be used. This activity will leverage the
Java Playground
to allow for real-time feedback on statements.
AP Computer Science A Free Response Question 1 String Practice
- Practice answering AP Computer Science A Style
String
free response question.
AP Computer Science A Free Response Question 1 if Statement Practice
- Practice answering AP Computer Science A Style free response question that includes if statements.