Bidi getLength() method in Java with Examples Last Updated : 03 Aug, 2021 Comments Improve Suggest changes Like Article Like Report 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 illustrate the getLength() method: Example 1: Java // Java program to demonstrate // getLength() method import java.text.*; import java.util.*; import java.io.*; public class GFG { public static void main(String[] argv) { // creating and initializing Bidi Bidi bidi = new Bidi("Geeks For Geeks", 0); // getting the length of line of text // using getLength() method int length = bidi.getLength(); // display the result System.out.println("length of line : " + length); } } Output: length of line : 15 Example 2: Java // Java program to demonstrate // getLength() method import java.text.*; import java.util.*; import java.io.*; public class GFG { public static void main(String[] argv) { // creating and initializing Bidi Bidi bidi = new Bidi("Tajmahal", 0); // getting the length of line of text // using getLength() method int length = bidi.getLength(); // display the result System.out.println("length of line : " + length); } } Output: length of line : 8 Reference: https://docs.oracle.com/javase/9/docs/api/java/text/Bidi.html#getLength-- Comment More infoAdvertise with us Next Article Bidi getLength() 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 Duration getUnits() method in Java with Examples The getUnits() method of Duration Class in java.time package is used to get the list of units that are supported by this duration. Syntax: public List<TemporalUnit> getUnits() Parameters: This method do not accepts any parameter. Return Value: This method returns a list of units that are suppo 1 min read Duration getNano() method in Java with Examples The getNano() method of Duration Class in java.time package is used to get the nanos value of this duration. Syntax: public long getNano() Parameters: This method do not accepts any parameter. Return Value: This method returns a long value of the nanos of this duration. Below examples illustrate the 1 min read ByteBuffer getLong() method in Java with Examples getLong() The getLong() method of java.nio.ByteBuffer class is used to read the next eight bytes at this buffer's current position, composing them into a long value according to the current byte order, and then increments the position by eight. Syntax: public abstract long getLong() Return Value: Th 5 min read Duration getSeconds() method in Java with Examples The getSeconds() method of Duration Class in java.time package is used to get the second value of this duration. Syntax: public long getSeconds() Parameters: This method do not accepts any parameter. Return Value: This method returns a long value of the seconds of this duration. Below examples illus 1 min read Like