Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Generate mixed cases of a word
Chethan Sharma
Ranch Hand
Posts: 59
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
How do I generate different cominations/ mixed cases of a
word
.
Eg:
Test
TEST
TEst
TESt
TesT
...............
Please let me know .
Thanks,
Rams
chaithu
Campbell Ritchie
Marshal
Posts: 79180
377
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you tried changing your
String
to a char[] array and using the toLowerCase and toUpperCase methods of Character?
Chengwei Lee
Ranch Hand
Posts: 884
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You could loop through the string, then for each character, you use a random generator to determine 1 or 0, then invoke the toLowerCase or toUpperCase method.
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
test case for servlets
Why can't I code?
generate data population source code for junit?
Dependency Inversion Principle
eclipse and junit - how to generate report?
More...