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

mysql - where clause in inner join query -

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

php - MySQL Query for Advanced Search multiple criteria -