JavaScript Required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Word Generator Version 3
Generating Random Words - Java
Random Words version 2
Random Words Final Version
More
Share
Explore
Generating Random Words - Java
PS
Peter Sigurdson
package mainapplication;
/*
generate 20 random words.
Store these words in an Array List.
Use NetBeans and paste your code in the box below:
*/
public class MainApplication {
public static void main(String[] args) {
Words.Run();
}
}
class Words{
public static void Run(){
java.util.Random rand = new java.util.Random();
String[] alphabet = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
// let's make our words 5 characters in length
String word = "start:";
for (int i = 0; i < 5; i++) {
word = word + alphabet[rand.nextInt(alphabet.length)] ;
}
// trace debug message: You could also write this out to a Text File
System.out.println("Debug point A: ");
System.out.println(word);
}
}
Related Docs
Two-way writeups: Coda’s secret to shipping fast
Lane Shackleton
An inside look at how Figma ships product
Yuhki Yamashita
Epics & OKRs Tracking Quick Start
Al Chen
Figma's approach to modern PRDs
Yuhki Yamashita
Coda's ritual of innovation: How we created (almost) 100 Packs in one day
Oliver Heckmann
Uber's App Redesign Project Doc
Yixin Zhu
Rethinking Google's Famous LaunchCal
Shiva Rajaraman
Pre-mortems: How a Stripe Product Manager predicts & prevents problems before launch
Shreyas Doshi
The OKR Starter Kit: Goal-setting for your team
Coda
How to Build a Product Plan in 15 Minutes [+Templates]
Al Chen
Feature Request Form Template to Collect User Feedback
Helena Jaramillo
Des Traynor's 4-Step Prioritised Productivity Guide
Des Traynor
The best methods for leading a scrum sprint planning meeting
Evan Davies
Product Alignment Framework: How Miro navigated explosive growth to 20 million users
Farbod Saraf
How to design your docs to shine like a diamond
Hieu Tran
Related Categories
Product design
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.