Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Convert string to matrix?

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Convert string to matrix?

    I have string abcdef
    I need to convert that string into 2 dimensional matrix.
    For each 2 characters in the string will be a matrix.
    For instance:
    String: abcdef
    Matrix will be: [a b],[c d],[e f]

    How to do that in java?
    Thank you.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Convert string to matrix?

    Review the String API for methods that can help you do what you've described.

Similar Threads

  1. hello everybody.help with convert a matrix to vector code
    By Linda95 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 11th, 2014, 03:13 PM
  2. Sequences (convert char[] to String) [Replacing String with Character]
    By tpolwort in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 25th, 2013, 02:56 PM
  3. Convert List<Set<String>> to string array
    By shatlav in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 4th, 2013, 08:16 AM
  4. [SOLVED] convert int to String
    By itispj in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 14th, 2011, 10:34 PM
  5. How can I convert a String to Set<String>? Is it possible?
    By noFear in forum Java Theory & Questions
    Replies: 2
    Last Post: August 25th, 2010, 09:03 AM