Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What are the examples of Interpreter design pattern in JDK?

Pragya Keshap answered on February 10, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • What are the design patterns involved in JDBC architecture?
  • What are some of the design patterns used in Java’s JDK library?
  • What are the examples of Builder design pattern in JDK?
  • What are the examples of Decorator design pattern in JDK?
  • What are the examples of Command design pattern in JDK?
  • What are the examples of Visitor design pattern in JDK?
  • What are the examples of Adapter design pattern in JDK
  • 19. Can you explain the Interpreter design pattern in Java? When to use it? What are its pros and cons?
  • interpreter design pattern
  • Java Decorator design pattern example of implementation
  • java decorator design pattern

  • What are the examples of Interpreter design pattern in JDK?

    0

    Interpreter design pattern is used to evaluate sentences in a

    language. E.g. In SQL we can use it to evaluate a query by

    evaluating each keyword like SELECT, FROM, WHERE clause.

    In an Interpreter implementation there is a class for each

    keyword/symbol. A sentence is just a composite of these keywords.

    But the sentence is represented by Syntax tree that can be

    interpreted.

    In JDK there are many places where Interpreter design pattern is

    used. Some of these are as follows:

    java.util.Pattern

    java.text.Normalizer

    Subclasses of java.text.Format: DateFormat,

    MessageFormat, NumberFormat

    Subclasses of javax.el.ELResolver: ArrayELResolver,

    MapELResolver, CompositeELResolver etc.

    https://www.baeldung.com/java-interpreter-pattern

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 10 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.