Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Data Structures Organizing Data Arrays

Sean Flanagan
Sean Flanagan
33,234 Points

Why does the console not clear when I type "clear" and clear when I don't want it to?

Hi.

I've activated the repl, as per Craig's instructions. The console refuses to clear when I type "clear" and it clears against my wishes when I return to my workspace. Does anyone know why please?

Thanks :-)

2 Answers

Jon Kussmann
PLUS
Jon Kussmann
Courses Plus Student 7,254 Points

Hi Sean,

When outside of the repl, "clear" will clear what you have. When inside the repl, the commands are different... I believe your options are CTRL-L or :cls

I hope this helps. If not please let me know.

Sean Flanagan
Sean Flanagan
33,234 Points

Hi Jon.

Sorry for being such a pain.

I tried "clear" with the repl off and it worked. I then tried ":cls" inside the repl and that worked too. And I did Ctrl L just for peace of mind. Once again, you've been a big help. Thanks Jon. :-)

Jon Kussmann
Jon Kussmann
Courses Plus Student 7,254 Points

Hi Sean,

Glad I could help. If it was a pain, I wouldn't be helping... this all reinforces what I've learned, so I'm happy to do it.

Sean Flanagan
Sean Flanagan
33,234 Points

Ctrl L ... that would explain why no text appeared on Craig's console when he cleared it at 2 minutes 30 seconds. Still, I guess it saves time to use keyboard shortcuts whenever you can.