Bidi isLeftToRight() method in Java with Examples Last Updated : 27 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The isLeftToRight() method of java.text.Bidi class is used to check if it has left to right line and base direction both or not. Syntax: public boolean isLeftToRight() Parameter: This method accepts nothing as parameter. Return Value: This method return true if this bidi has both left to right line and base direction otherwise false. Below are the examples to illustrate the isLeftToRight() method: Example 1: Java // Java program to demonstrate // isLeftToRight() 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); // checking both line and base direction // using isLeftToRight() method boolean status = bidi.isLeftToRight(); // display the result if (status) System.out.println( "Both Line and Base " + "direction is left to right"); else System.out.println( "Both Line and Base " + "direction is not left to right "); } } Output: Both Line and Base direction is left to right Example 2: Java // Java program to demonstrate // isLeftToRight() 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_RIGHT_TO_LEFT); // checking both line and base direction // using isLeftToRight() method boolean status = bidi.isLeftToRight(); // display the result if (status) System.out.println( "Both Line and Base " + "direction is left to right"); else System.out.println( "Both Line and Base " + "direction is not left to right "); } } Output: Both Line and Base direction is not left to right Reference: https://docs.oracle.com/javase/9/docs/api/java/text/Bidi.html#isLeftToRight-- Comment More infoAdvertise with us Next Article Bidi isLeftToRight() method in Java with Examples R rohitprasad3 Follow Improve Article Tags : Java Java-Functions Java-text package Java-Bidi Practice Tags : Java Similar Reads Calendar isLenient() Method in Java with Examples The isLenient() method in Calendar class is used to know and understand whether the date and time interpretation of this Calendar is to be considered lenient or not.Syntax: public boolean isLenient() Parameters: The method does not take any parameters.Return Value: The method either returns True if 2 min read DateFormat isLenient() Method in Java with Examples The isLenient() method in DateFormat class is used to know and understand whether the parsing of date and time of this DateFormat object is to be considered lenient or not. Syntax: public boolean isLenient() Parameters: The method does not take any parameters. Return Value: The method either returns 2 min read Year isLeap() method in Java with Examples The isLeap() method of Year class in Java is used to check if this Year object is a leap year or not according to the proleptic calendar system rules. A year is a leap year if it has 366 days in it. According to the proleptic calendar system rules, a year is a Leap year if: If it is divisible by 4. 2 min read Instant until() Method in Java with Examples until() method of an Instant class used to calculate the amount of time between two Instant objects using TemporalUnit. The start and end points are this and the specified instant passed as a parameter. The result will be negative if the end is before the start. The calculation returns a whole numbe 2 min read Instant minus() method in Java with Examples In Instant class, there are two types of minus() method depending upon the parameters passed to it. minus(long amountTosubtract, TemporalUnit unit) minus() method of a Instant class used to returns a copy of this instant with the specified amount of unit subtracted.If it is not possible to subtract 2 min read Like