|
-
Help!!, Changing from uppercase to lowercase
I am trying to read in a file and change the first letter of the first word to uppercase and then change the second word to upperCase and so on. Also, I need to delete all the spaces in between. Example:
Contol Measure Mapping (needs to look like) controlMeasureMapping
If anyone can assist me, I would really appreciate it. I will provide the code where I am stuck below.
import java.io.*;
import javax.swing.*;
class BufferReaderDemo {
public static void main(String args[]) {
try {
FileReader fr = new FileReader("C:\\Documents and Settings\\rwhitehurst\\Desktop\\Test.txt");
BufferedReader br = new BufferedReader(fr);
String s;
int ToCharArray[] = new int[4];
String output = "Index\tValue\n";
while((s = br.readLine()) != null){
if (s.length() > 0)
{
}
System.out.println(s);
}
fr.close();
}
catch(Exception e) {
System.out.println("Exception: " + e);
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks