I am sorry that I was harsh to you. It just seemed to me that you created the question immediately after creating the code. Since this is not the case I apologize to you.
Did you change the condition in line 29? It should be if(c >= 2 && k >= 2) and not if(c >= 2 && c >= 2)
I guess then your code should work. The rest seems fine to me.
Just a tip for numbers. The Character class has a nice method: isDigit()
If a character is a digit it returns true, else false.
So you can also write:
And because I just noticed it:
You created the code before 41 minutes
You created the question before 40 minutes.
Code is not working -> ask question.
This is not you should do it to get a good programmer.
code is not working -> debug -> ask question if you can't find the bug.
It is just a suggest. But I think you should spend more time on your code.
No Problem :)
Making breaks are important. If you stare at a code for too long, you don't see anything. In most cases you just see what you expect.
For me it helps to do a break for at least one hour where I close the app and do something else. Then looking at the code again: "What have I done here?" :D
Bugs happens and I guess it will never end. ;) But over the time you will learn how to find your bugs.
Denise Roßberg It's annoying to endure such hard words since I tried to find the bug in code coach and then thought of putting the question .
And we can not direct to code coach solution directly so I need to copy it to create a code bit. Only then I had put the question. It's not what you are thinking .
Also for your suggest , I would humbly say that I am not a good programmer rather would have others help me to understand test conditions better.