java methods joined by a dot -


I am thinking of joining a dot in Java in two ways, for example the following code:

  string driver class = getServletContext (). GetInitParameter ("driverClass"); Anyone can tell what this line means:  
  getServletContext (). GetInitParameter ("driverClass");   

The two ways are connected to the dot, why? Simple answer: This is called chaining, the first method gives an object and it is returned (object) on it. The second method is called. We save a line to specify it in a variable.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -