Bidi getRunCount() method in Java with Examples Last Updated : 27 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The getRunCount() method of java.security.Bidi class used to provide the number of base levels present in line of bidi text. Here we will find only one base level because we are using only one base level at a time. Syntax: public int getRunCount() Parameter: This method accepts nothing as parameter. Return Value: This method provides the number of levels currently running . Below are the examples to illustrate the getRunCount() method: Example 1: Java // Java program to demonstrate // getRunCount() method import java.text.*; import java.util.*; import java.io.*; public class GFG { public static void main(String[] argv) { // creating and initializing Bidi // with base direction Bidi bidi = new Bidi( "Geeks For Geeks", Bidi.DIRECTION_LEFT_TO_RIGHT); // getting the number of level // using getRunCount() method int lvl = bidi.getRunCount(); // display the result System.out.println( "number of levels : " + lvl); } } Output: number of levels : 1 Example 2: Java // Java program to demonstrate // getRunCount() method import java.text.*; import java.util.*; import java.io.*; public class GFG { public static void main(String[] argv) { // creating and initializing Bidi // with base direction Bidi bidi = new Bidi( "Tajmahal", Bidi.DIRECTION_RIGHT_TO_LEFT); // getting the number of level // using getRunCount() method int lvl = bidi.getRunCount(); // display the result System.out.println( "number of levels : " + lvl); } } Output: number of levels : 1 Reference: https://docs.oracle.com/javase/9/docs/api/java/text/Bidi.html#getRunCount-- Comment More infoAdvertise with us Next Article Bidi getRunCount() method in Java with Examples R rohitprasad3 Follow Improve Article Tags : Java Java-Functions Java-text package Java-Bidi Practice Tags : Java Similar Reads Bidi getRunLimit() method in Java with Examples The getRunLimit() method of java.text.Bidi class is used to provide the (index +1) value of the last character where the last run ends of this Bidi instance. Syntax: public int getRunLimit(int run) Parameters: This method accepts the index of the run for which Run limit is to be retrieved. Return Va 2 min read Bidi getRunStart() method in Java with Examples The getRunStart() method of java.text.Bidi class used to provide the index of the first character where the nth run starts for this Bidi instance. Syntax: public int getRunStart(int run) Parameters: This method accepts the index of the logical run for which start of the run is to be retrieved. Retur 2 min read Bidi getRunLevel() method in Java with Examples The getRunLevel() method of java.text.Bidi class used to provide the level for the nth run of this line of text if there is only one running state then It will provide base level for that state . Syntax: public int getRunLevel(int run) Parameters: This method accepts the index of the logical run for 2 min read Bidi getLength() method in Java with Examples The getLength() method of java.text.Bidi class is used to get the length of the text in this Bidi instance. Syntax: public int getLength() Parameter: This method accepts nothing as parameter. Return Value: This method provides the length of the bidi text as integer. Below are the examples to illustr 2 min read Path getNameCount() method in Java with Examples The Path interface was added to Java NIO in Java 7. The Path interface is located in the java.nio.file package, so the fully qualified name of the Java Path interface is java.nio.file.Path. A Java Path instance represents a path in the file system. A path can use to locate either a file or a directo 2 min read Like