Bidi toString Example

Bidi class toString example. This example shows you how to use toString method.


Bidi class toString example. public String toString() Display the bidi internal state, used in debugging.

Here is the code
/*
 * @ # ToString.java
 * A class repersenting use to toString 
 * method of Bidi class in java.text package
 * version 13 June 2008
 * author Rose India 
 */

import java.text.*;

public class ToString {

    public static void main(String args[]) {

        String s = "Rose india.net";
        char[] ch = s.toCharArray();
        byte[] embeddings = {1234};
        int textStart = 0, embStart = 0, paragraphLength = 4;
        int flag = Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
        Bidi bidi = new Bidi(ch, textStart, embeddings,
                embStart, paragraphLength, flag);

        System.out.println(bidi.toString());
    }
}

Output
java.text.Bidi@1a46e30[dir: 2 baselevel: 0 length: 4 runs: [2/2 4/4] cws: []]

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US