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 -

php - How can I cram 6+31 numeric characters into 22 alphanumeric characters? -

mysql - where clause in inner join query -