Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!

Bao Truong

Greenhorn
+ Follow
since Oct 12, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
2
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bao Truong

Here's the first method with some changes and the method with no substring()

3 weeks ago
Thanks guys, I fixed the problem and made a less bulky version without using substring()
3 weeks ago
I need help with this method, which is to count how many times "hi" occurs in a string.

The code below works with "", " ", "hi" or anything with no more than one "hi" but seems to enters an infinite loop with strings that contain more than one "hi" such as "hihi".


3 weeks ago
I have a small question, in the command shell, what is the difference between typing >java HelloWorldApp and >java -cp . HelloWorldApp to run the HelloWorldApp program, they give the same results (printing out "Hello World") so which of them should I use?
1 month ago
Thank you very much guys for the help.
3 months ago

Liutauras Vilda wrote:@OP

The algorithm you got right, so I guess we just need to clarify, whether you understand why passing pos++ as an argument really was a mistake?


I need to use pos+1 instead because pos++ will only increment pos after the method have used it?
3 months ago
I want to design a method to compute the sum of numbers store in an array using recursion. This is what I have came up with.
   
This would cause the said error, I've checked it for anything that could cause the recursion to never terminate but still don't know what's wrong with it. Help :((
3 months ago