Register FAQ Calendar Search Today's Posts Mark Forums Read

Go Back   Java Programming Forums > Java Programming > Advanced Java

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 23-07-2008, 07:03 AM
Junior Member
 
Join Date: Jul 2008
Location: Hamilton, New Zealand
Posts: 2
superwaxer is on a distinguished road
Default Tokinizers

Hi Guys,

Im a 2nd year IT student doing my bachelors degree in New Zealand. So I was wondering... is there something in Java that works like StringTokinizer but divides a sentence into characters? I know its possible I just dont know how. I basically want to try and make and encoder that encodes normal .txt documents.

Thanks!
Reply With Quote
  #2 (permalink)  
Old 23-07-2008, 02:54 PM
Member
 
Join Date: May 2008
Posts: 58
Engineeringserver.com is on a distinguished road
Default Re: Tokinizers

Hi, welcome to the forums!

This is one way to do it:

Java Code:
public class CharDemo {
    public static void main(String[] args){
 
        String sentence = "This is a sentence";
        char[] charSentence = sentence.toCharArray();
        for(int i = 0; i < sentence.length(); i++){
            System.out.print(charSentence[i]);
        }
    }
}
Reply With Quote
  #3 (permalink)  
Old 23-07-2008, 09:04 PM
Junior Member
 
Join Date: Jul 2008
Location: Hamilton, New Zealand
Posts: 2
superwaxer is on a distinguished road
Default Re: Tokinizers

Thank you so much that really helps alot! I think we can call this one solved!

Cheers guys
Reply With Quote
  #4 (permalink)  
Old 23-07-2008, 09:09 PM
Member
 
Join Date: May 2008
Posts: 58
Engineeringserver.com is on a distinguished road
Default Re: Tokinizers

Sure, np
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Custom Search
100 most searched terms
Search Cloud
"bad endpoint type" com.sun.xml.internal.messaging.saaj.soapexceptionimpl com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad endpoint type com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed convert arraylist to map date_format_now eclipse shortcut keys ejb3 quartz java convert double to binary java forum java forums java jtextarea bold java jtextarea color java jtextarea font java jtextarea font size java programmer forum java programmers forum java programming forum java programming forums java read last line java read last line of file java sendkeys java.security.privilegedactionexception java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad response java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed javapf javaprogrammingforums jtextarea bold jtextarea font jtextarea font color jtextarea font size programing forums programming forums reset jcombobox saaj0008 saaj0008: bad response; bad request saaj0008: bad response; not found severe: saaj0008 severe: saaj0008: bad response; bad request severe: saaj0008: bad response; not found soap java.security.privilegedactionexception soapexceptionimpl: bad endpoint type textpad java

All times are GMT. The time now is 02:38 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.