AshutoshP Patil wrote:1)how the pattern works ? is it a abstract class or singleton class?
Not sure what you're asking here. Pattern is a class, it has static methods, it has instance methods, like many other classes.
2)the part // 1 " st.mt1.find();" which calls the method find() returns a Boolean value true or false .
but the return of this method is not assigned to any variable ? Then how this works ?
Just because a method returns a variable doesn't mean it has to be used.