This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Java array help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java array help" Watch "Java array help" New topic
Author

Java array help

Tracie Marshall
Greenhorn

Joined: Jan 24, 2010
Posts: 1
So, I have this code and I have an array of alphabets which I've copied into a new array. No I need to go through the array and print the vowels "a,e,i,o,u" in uppercase. I was wondering if anyone could help me.
Thanks!

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
I don't really get the sense of it but this should help

first, your array should be of type char and not String...

you can also iterate over the array using the enhanced for loop .


JDBCSupport - An easy to use, light-weight JDBC framework -
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I don't get it either. Why are you using an arraycopy?
But instead of String.valueOf(c).toUpperCase() I would use Char.toUpperCase(c);


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java array help