Java Help Requested
I've added a few test cases including those that were included with the instructions as examples.
I have tried printing out certain variables all throughout the code, and sometimes it's correct and sometimes the variable "tweet" prints a single space.
Well, it's good that on my setup, all of the examples that you marked as returning incorrect output actually work correctly with the code you posted. That means nothing is wrong with your code. It's a problem with your compiling process, or more likely, an input process. If "tweet" outputs as a single space, then there's a problem with you typing it in/the program receiving the text because "tweet" is never modified after you assign the initial String.
Are you running your program in an IDE (specify which one) or the terminal? I ran it successfully in IntelliJ Idea. edit: It works correctly with Windows Command Prompt, too.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now