Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
After setting i to 1 circle of loop finished and next line of code that will be executed is i++. So, yes, in begining of next circle of loop i will be equal to 2
What exactly does setting i to 1 in the for loop do? I can see that it matters, because you lose multiples of 2 if you take it out, but I don't understand what it does. When the conditions of the for loop are evaluated once i is set to 1, does i get reset to 2?
thank you!
no.
Is recursion faster/uses less memory than a for loop?
When I put this into eclipse like it is, then try some examples in the main method, I get the following error messages:
For example:
public static void main(String[] args) {
System.out.println(camelCase("thisIsOneString"));
}
Exception in thread "main" java.lang.IndexOutOfBoundsException: No group 1
at java.base/java.util.regex.Matcher.start(Matcher.java:482)
at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1090)
at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:997)
at java.base/java.util.regex.Matcher.replaceAll(Matcher.java:1181)
at java.base/java.lang.String.replaceAll(String.java:2142)
at DigPow/myPackage.Solution2.camelCase(Solution2.java:6)
at DigPow/myPackage.Solution2.main(Solution2.java:9)
What does it mean by group 1?