Hi guys. I’m new to Java, currently learning Strings. I have a task to count the number of names, the length of the name must be at least two, the first letter of the name should start with upper case, the second with lower case. The issue is that I don’t know how to use the Character.isUpperCase(text.charAt(i)) and Character.isLowerCase(text.charAt(i +
Tag: counter
How to have one array to Store a String and another to cout how many times that String was used?
I’m making an app for an ice cream shop where I need at some point to know how many ice cream from a specific flavor were sold. I have to write the flavor of the ice cream when I add it to the stock, so the ArrayList that contains the flavor is initially empty. Then I need another ArrayList which
How would the weighted quick-union Algorithm be implemented?
I’m currently enrolled in the Princeton Algorithms course (Part 1) and it talks about an improvement to the quick-union algorithm by maintaining an extra array sz[i] to count the number of objects in the tree rooted i, but it doesn’t show how to do that. Where and how is that counter supposed to be implemented? I’ve tried doing it in
How can I clear/reset the canvas with a counter or countdown in Processing?
I would like to know how can I set a reset loop: While the draw() is going on I would like to clear the canvas so I can start to draw on a clean canvas again and again. (I don’t want to use keyPressed() or mousePressed() it has to be automatic) Thank you for your help in advice! Answer You