# Coding and Debugging Help

**URL:** https://forum.code.org/c/csa/debugging-help/447.md

[Latest](https://forum.code.org/latest.md) · [Categories](https://forum.code.org/categories.md) · [Tags](https://forum.code.org/tags.md)

---

## [Tips for Getting Help in CSA](https://forum.code.org/t/tips-for-getting-help-in-csa/36291)

<div class="topic-metadata">

**Author:** [@jamila](https://forum.code.org/u/jamila)\
**Replies:** 1\
**Last updated:** [May 5, 2022, 6:34pm UTC](https://forum.code.org/t/tips-for-getting-help-in-csa/36291 "2022-05-05T18:34:16Z")

</div>

Welcome to the debugging category! Debugging is a normal (and inevitable) part of learning how to code. This category is a place for the community to support each other through the process of finding and fixing problems…

---

## [About the Coding and Debugging Help category](https://forum.code.org/t/about-the-coding-and-debugging-help-category/36290)

<div class="topic-metadata">

**Author:** [@jamila](https://forum.code.org/u/jamila)\
**Replies:** 0\
**Last updated:** [May 5, 2022, 6:23pm UTC](https://forum.code.org/t/about-the-coding-and-debugging-help-category/36290 "2022-05-05T18:23:38Z")

</div>

Get help debugging or answering questions about code.

---

## [Unit 8 Lesson 7 Level 3 Investigate and Modify](https://forum.code.org/t/unit-8-lesson-7-level-3-investigate-and-modify/41792)

<div class="topic-metadata">

**Author:** [@mdsanders](https://forum.code.org/u/mdsanders)\
**Replies:** 1\
**Last updated:** [February 17, 2026, 10:26pm UTC](https://forum.code.org/t/unit-8-lesson-7-level-3-investigate-and-modify/41792 "2026-02-17T22:26:07Z")

</div>

Hello, When I follow the instructions for 8.7 Level three for adding the mystery2 method, all it returns is an empty ArrayList. Below is my code in the runner file where I declare & initialize the ArrayLists and call t…

---

## [CSA Unit 2 Lesson 9 Bubble 6 Test : test.Dessert error](https://forum.code.org/t/csa-unit-2-lesson-9-bubble-6-test-test-dessert-error/41467)

<div class="topic-metadata">

**Author:** [@pmooney](https://forum.code.org/u/pmooney)\
**Replies:** 2\
**Last updated:** [October 27, 2025, 12:45am UTC](https://forum.code.org/t/csa-unit-2-lesson-9-bubble-6-test-test-dessert-error/41467 "2025-10-27T00:45:18Z")

</div>

Student code runs; however, the Test reports an error on test.Dessert.

---

## [Unit 1 Lesson 3 Level 2 Test Not Working](https://forum.code.org/t/unit-1-lesson-3-level-2-test-not-working/41178)

<div class="topic-metadata">

**Author:** [@mdsanders](https://forum.code.org/u/mdsanders)\
**Replies:** 3\
**Last updated:** [August 18, 2025, 2:25pm UTC](https://forum.code.org/t/unit-1-lesson-3-level-2-test-not-working/41178 "2025-08-18T14:25:32Z")

</div>

Hello! When I run the Test for number 5 on the Activity Guide, nothing happens in the console. Does anyone know what could be causing this problem?

---

## [CSA 6.10 Natural Language Processing Project - FileReader.textToString Error](https://forum.code.org/t/csa-6-10-natural-language-processing-project-filereader-texttostring-error/39026)

<div class="topic-metadata">

**Author:** [@crodgers](https://forum.code.org/u/crodgers)\
**Replies:** 7\
**Last updated:** [April 17, 2025, 1:20pm UTC](https://forum.code.org/t/csa-6-10-natural-language-processing-project-filereader-texttostring-error/39026 "2025-04-17T13:20:58Z")

</div>

One of my students is attempting to use FileReader.textToString to import text files into an ArrayList as was done in Lesson 6.7, option a. In 6.7a the code reads as follows: import java.util.ArrayList; public class W…

---

## [Unit 5 Lesson 5 Enhanced For Loops to traverse 2D Array](https://forum.code.org/t/unit-5-lesson-5-enhanced-for-loops-to-traverse-2d-array/40432)

<div class="topic-metadata">

**Author:** [@cicaneser](https://forum.code.org/u/cicaneser)\
**Replies:** 6\
**Last updated:** [February 22, 2025, 7:30pm UTC](https://forum.code.org/t/unit-5-lesson-5-enhanced-for-loops-to-traverse-2d-array/40432 "2025-02-22T19:30:28Z")

</div>

Can someone please explain in more detail why we only need to change the inner loop in the nested enhanced for loops in order to change the elements in the 2D Array? I thought that with the enhanced for loop it was only …

---

## [Is there a way for an image's transparency to be manipulated in JavaLab?](https://forum.code.org/t/is-there-a-way-for-an-images-transparency-to-be-manipulated-in-javalab/40383)

<div class="topic-metadata">

**Author:** [@michael.fiscus](https://forum.code.org/u/michael.fiscus)\
**Replies:** 2\
**Last updated:** [February 11, 2025, 3:19am UTC](https://forum.code.org/t/is-there-a-way-for-an-images-transparency-to-be-manipulated-in-javalab/40383 "2025-02-11T03:19:27Z")

</div>

I have a student who is trying to change the alpha value for his image pixels, but we can’t figure out a way to do it. Any ideas?

---

## [U5L8 Level 4 Choice B Emboss Filter](https://forum.code.org/t/u5l8-level-4-choice-b-emboss-filter/40382)

<div class="topic-metadata">

**Author:** [@michael.fiscus](https://forum.code.org/u/michael.fiscus)\
**Replies:** 3\
**Last updated:** [February 10, 2025, 7:49pm UTC](https://forum.code.org/t/u5l8-level-4-choice-b-emboss-filter/40382 "2025-02-10T19:49:00Z")

</div>

My student has code that seems fine to me, but the tests fail and state that the R, G, and B values are 1 or 2 pixels low. Can anyone figure out the problem?

---

## [Unit 6 Lesson 2 - Level 8B (Chatbot)](https://forum.code.org/t/unit-6-lesson-2-level-8b-chatbot/40258)

<div class="topic-metadata">

**Author:** [@a112032](https://forum.code.org/u/a112032)\
**Replies:** 4\
**Last updated:** [January 13, 2025, 2:54am UTC](https://forum.code.org/t/unit-6-lesson-2-level-8b-chatbot/40258 "2025-01-13T02:54:00Z")

</div>

Anyone else having problems with the test on this level? Here’s my current project code: I tried a few different ways to solve it, including guarding against not finding a match and, in that case, not adding anything…

---

## [Unit 4 - Lesson 6 - Extra Practice](https://forum.code.org/t/unit-4-lesson-6-extra-practice/40138)

<div class="topic-metadata">

**Author:** [@a112032](https://forum.code.org/u/a112032)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 1:50am UTC](https://forum.code.org/t/unit-4-lesson-6-extra-practice/40138 "2024-11-21T01:50:13Z")

</div>

Pretty sure this should be “return color” . Crayon is a reference to the marker object created in another class. I checked last year’s version and this year’s version and it’s in both, which has me hesitating (some mi…

---

## [CSA: Unit 2: Lesson 4 - Level 7: Auto-grader not working](https://forum.code.org/t/csa-unit-2-lesson-4-level-7-auto-grader-not-working/40029)

<div class="topic-metadata">

**Author:** [@michael\_goddard](https://forum.code.org/u/michael_goddard)\
**Replies:** 3\
**Last updated:** [November 4, 2024, 5:02pm UTC](https://forum.code.org/t/csa-unit-2-lesson-4-level-7-auto-grader-not-working/40029 "2024-11-04T17:02:14Z")

</div>

In Unit 2: Lesson 4 - Level 7 of the CSA course, the auto-grader (Test) does not appear to be working. I could not get it to pass all tests, so I checked the example solution in the lesson and the example does not pass e…

---

## [U2L3 - Parameterized Constructors - Level 7C - Program runs, test fails](https://forum.code.org/t/u2l3-parameterized-constructors-level-7c-program-runs-test-fails/38548)

<div class="topic-metadata">

**Author:** [@a112032](https://forum.code.org/u/a112032)\
**Replies:** 16\
**Last updated:** [October 7, 2024, 1:07pm UTC](https://forum.code.org/t/u2l3-parameterized-constructors-level-7c-program-runs-test-fails/38548 "2024-10-07T13:07:59Z")

</div>

Hello code.org community, I know we are all busy this time of year but I would sincerely appreciate anyone who has the time to help. The problem: Student attempting to complete U2L3 - Parameterized Constructors - Level7…

---

## [Is there a way to hide the painter](https://forum.code.org/t/is-there-a-way-to-hide-the-painter/37015)

<div class="topic-metadata">

**Author:** [@randle.moore](https://forum.code.org/u/randle.moore)\
**Replies:** 14\
**Last updated:** [September 26, 2024, 2:43am UTC](https://forum.code.org/t/is-there-a-way-to-hide-the-painter/37015 "2024-09-26T02:43:44Z")

</div>

A students is doing his project for Unit 1 Lessons 16-18. He wants to hide the painter once the picture is drawn. Is there a way to hide the painter? - Randle

---

## [Problems with exported gamelab API & Possibly applab](https://forum.code.org/t/problems-with-exported-gamelab-api-possibly-applab/39374)

<div class="topic-metadata">

**Author:** [@varrience](https://forum.code.org/u/varrience)\
**Replies:** 3\
**Last updated:** [May 24, 2024, 11:57pm UTC](https://forum.code.org/t/problems-with-exported-gamelab-api-possibly-applab/39374 "2024-05-24T23:57:14Z")

</div>

Hello all, just double checking if others are having the same issue I’ve been having running my projects externally, the original way CDO had it was fine but the newer one has a file path problem with assets mainly music…

---

## [Unit 2 Input - nextInt method](https://forum.code.org/t/unit-2-input-nextint-method/39254)

<div class="topic-metadata">

**Author:** [@mjdeister](https://forum.code.org/u/mjdeister)\
**Replies:** 5\
**Last updated:** [April 8, 2024, 4:45pm UTC](https://forum.code.org/t/unit-2-input-nextint-method/39254 "2024-04-08T16:45:35Z")

</div>

It seems that nextLine is not working properly when using a Scanner object especially when there are multiple inputs of different types. Anyone else had this issue and is there a workaround?

---

## [CSA: Unit 8 Lessonn 7 Exercise 6(a)](https://forum.code.org/t/csa-unit-8-lessonn-7-exercise-6-a/39220)

<div class="topic-metadata">

**Author:** [@bavarians](https://forum.code.org/u/bavarians)\
**Replies:** 1\
**Last updated:** [March 28, 2024, 3:07am UTC](https://forum.code.org/t/csa-unit-8-lessonn-7-exercise-6-a/39220 "2024-03-28T03:07:02Z")

</div>

This is my solution to the problem, but when I test it I get an IndexOutOfBounds Exception. I compared it to the teacher’s solution and it seems that the only difference is that in my solution I traverse backwards. Can…

---

## [Unit 6 Lesson 6 part 7a (customer review) incorrect](https://forum.code.org/t/unit-6-lesson-6-part-7a-customer-review-incorrect/39161)

<div class="topic-metadata">

**Author:** [@tsinnott](https://forum.code.org/u/tsinnott)\
**Replies:** 3\
**Last updated:** [March 25, 2024, 3:35pm UTC](https://forum.code.org/t/unit-6-lesson-6-part-7a-customer-review-incorrect/39161 "2024-03-25T15:35:53Z")

</div>

The Example solution is incorrect. You should not parse the responses by finding " ". It will fail to match “great” with “great!”. If you run the example solution, it says the word great exists 2 times in the first respo…

---

## [CSA Unit 4, Lesson 2, Level 8 example is wrong](https://forum.code.org/t/csa-unit-4-lesson-2-level-8-example-is-wrong/39027)

<div class="topic-metadata">

**Author:** [@codedotorg](https://forum.code.org/u/codedotorg)\
**Replies:** 3\
**Last updated:** [February 29, 2024, 1:04pm UTC](https://forum.code.org/t/csa-unit-4-lesson-2-level-8-example-is-wrong/39027 "2024-02-29T13:04:15Z")

</div>

If you select the Rubik’s Cube solver exercise, it says you’re finding the fastest solver, but then requires the following: /\* ----------------------------------- TO DO ----------------------------------- \* …

---

## ["Type error:Not a function" I cannot figure it out](https://forum.code.org/t/type-error-not-a-function-i-cannot-figure-it-out/39003)

<div class="topic-metadata">

**Author:** [@milnedan001](https://forum.code.org/u/milnedan001)\
**Replies:** 3\
**Last updated:** [February 8, 2024, 4:18pm UTC](https://forum.code.org/t/type-error-not-a-function-i-cannot-figure-it-out/39003 "2024-02-08T16:18:05Z")

</div>

I am trying to detect if the user id is already in a table and return false if it is But whenever I try to run the program it says that it thinks it is a function and the whole project comes to a halt I haven’t tried…

---

## [Coding and Debugging with circuit playground](https://forum.code.org/t/coding-and-debugging-with-circuit-playground/38955)

<div class="topic-metadata">

**Author:** [@bnarsiman](https://forum.code.org/u/bnarsiman)\
**Replies:** 2\
**Last updated:** [February 1, 2024, 11:47pm UTC](https://forum.code.org/t/coding-and-debugging-with-circuit-playground/38955 "2024-02-01T23:47:17Z")

</div>

Re Circuit Playground - Lesson 4 - Lock /Unlock App I have an advanced student who is using code /input for this activity - his code is pasted below. There are no coding errors, however the code is not running how he wo…

---

## [U5L9, Level 3 Theater Missing?](https://forum.code.org/t/u5l9-level-3-theater-missing/38900)

<div class="topic-metadata">

**Author:** [@williamsj1](https://forum.code.org/u/williamsj1)\
**Replies:** 3\
**Last updated:** [January 22, 2024, 4:28pm UTC](https://forum.code.org/t/u5l9-level-3-theater-missing/38900 "2024-01-22T16:28:46Z")

</div>

The instructions say to experiment with different edge distance values to see how it effects the edge detection, so I think I’m supposed to Run it. However, I get an exception: \[EXCEPTION\] Level type mismatch: Theater …

---

## [Server issue HELP!](https://forum.code.org/t/server-issue-help/38754)

<div class="topic-metadata">

**Author:** [@yanet.cabrera](https://forum.code.org/u/yanet.cabrera)\
**Replies:** 1\
**Last updated:** [December 4, 2023, 9:35pm UTC](https://forum.code.org/t/server-issue-help/38754 "2023-12-04T21:35:07Z")

</div>

The student cretaed the following code: New Java Lab Project - Code.org I keep getting the following message when I run the code: Sometimes I get that message and other times I dont and it runs fine.

---

## [U3L6 Test button shows "Failed" when output is correct](https://forum.code.org/t/u3l6-test-button-shows-failed-when-output-is-correct/38669)

<div class="topic-metadata">

**Author:** [@kchristiana](https://forum.code.org/u/kchristiana)\
**Replies:** 1\
**Last updated:** [November 15, 2023, 8:15pm UTC](https://forum.code.org/t/u3l6-test-button-shows-failed-when-output-is-correct/38669 "2023-11-15T20:15:43Z")

</div>

In Unit 3, Lesson 6, Practice 7 for “Bank Account”, the example solution shows as failed when “Test” is run. The output, however, is correct/

---

## [Professional Dev training. It cant compile my program? No idea why. anybody can help on variables](https://forum.code.org/t/professional-dev-training-it-cant-compile-my-program-no-idea-why-anybody-can-help-on-variables/38164)

<div class="topic-metadata">

**Author:** [@proslak138](https://forum.code.org/u/proslak138)\
**Replies:** 4\
**Last updated:** [August 12, 2023, 2:26am UTC](https://forum.code.org/t/professional-dev-training-it-cant-compile-my-program-no-idea-why-anybody-can-help-on-variables/38164 "2023-08-12T02:26:40Z")

</div>

public class MathPractice{ public static void main(String args){ // TO DO: // 1. Declare and initialize two variables of type int. int x; int y; x=5; y=6; // 2. Declare and initialize a variable to hold the sum …

---

## [Post-AP Exam Projects and timeouts in Java Lab](https://forum.code.org/t/post-ap-exam-projects-and-timeouts-in-java-lab/38050)

<div class="topic-metadata">

**Author:** [@tlsmith2](https://forum.code.org/u/tlsmith2)\
**Replies:** 4\
**Last updated:** [May 15, 2023, 3:23am UTC](https://forum.code.org/t/post-ap-exam-projects-and-timeouts-in-java-lab/38050 "2023-05-15T03:23:44Z")

</div>

I was planning on assigning a project in Java Lab to my APCSA students after the AP exam is over. My thought was to allow students to develop a more a project using the Theater and Scenes in the Theater sandbox, or for …

---

## [ChatGPT as a tool - for you!](https://forum.code.org/t/chatgpt-as-a-tool-for-you/37696)

<div class="topic-metadata">

**Author:** [@brendan.murray](https://forum.code.org/u/brendan.murray)\
**Replies:** 1\
**Last updated:** [March 3, 2023, 12:36am UTC](https://forum.code.org/t/chatgpt-as-a-tool-for-you/37696 "2023-03-03T00:36:27Z")

</div>

Good Morning everyone! This is my first year teaching and my first semester teaching AP CSA. The Code.org curriculum has been AWESOME for my students and myself. I’ve coded in the past but was out of the field for quit…

---

## [U5L4 Extra Practice - Reversing Rows and Columns of a 2D Array](https://forum.code.org/t/u5l4-extra-practice-reversing-rows-and-columns-of-a-2d-array/37577)

<div class="topic-metadata">

**Author:** [@nlsmith](https://forum.code.org/u/nlsmith)\
**Replies:** 2\
**Last updated:** [February 2, 2023, 1:59pm UTC](https://forum.code.org/t/u5l4-extra-practice-reversing-rows-and-columns-of-a-2d-array/37577 "2023-02-02T13:59:25Z")

</div>

In the free response section of U5L4 Extra practice, the following prompt is given: Do This: Write a reverse method that modifies the parameter instead of returning a new 2D array. For example, if arr contains {{1, 2, 3…

---

## [U5L2 Extra Practice - AP Exam Prep](https://forum.code.org/t/u5l2-extra-practice-ap-exam-prep/37578)

<div class="topic-metadata">

**Author:** [@jennifer.couling](https://forum.code.org/u/jennifer.couling)\
**Replies:** 2\
**Last updated:** [February 1, 2023, 9:23pm UTC](https://forum.code.org/t/u5l2-extra-practice-ap-exam-prep/37578 "2023-02-01T21:23:53Z")

</div>

\*\*Please help…the answer key says that B is correct, but I can’t figure out why. I’m a new AP CSA teacher and I can’t figure it out. TIA for your help. \*\* Question: Consider the following code segment. int array2D = {{…

---

## [U3 Data for Social Good Project - Null Pointer Exception](https://forum.code.org/t/u3-data-for-social-good-project-null-pointer-exception/37308)

<div class="topic-metadata">

**Author:** [@sam\_stafford](https://forum.code.org/u/sam_stafford)\
**Replies:** 4\
**Last updated:** [December 7, 2022, 7:25pm UTC](https://forum.code.org/t/u3-data-for-social-good-project-null-pointer-exception/37308 "2022-12-07T19:25:28Z")

</div>

I was helping my student with their project and I was receiving a null pointer exception that I was able to fix but don’t know why the fix woks. Here is a link to the full project but I will highlight the code snippets t…

[Next page](https://forum.code.org/c/csa/debugging-help/447.md?page=1)
