JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
Share
Explore
Programming Drill: Procrusteam String
PS
Peter Sigurdson
Do your Work in Netbeans and paste your Code into the Classmarker box: This should take less than 5 minutes.
Write a Java Program to implement a Procrutsean String algorithm:
Make an ArrayList of 20 randomly generated strings, of random random length
Now iterate over your ArrayList and force each string to be 20 characters in Length
Output the result.
You are expected by now to know how to structure a basic Java OO program.
Just like you will do at work, refer to the Java API Document to get your starter code.
https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.