Here is my code :
result = method1().method2().method3();
I would like to know the execution hierarchy of the above code/
I'm explaining hierarchy of the above code with small example.
result = method1().method2().method3();
Example:
getYear().toString().trim(); //like method1().method2().method3()First will be execute get year() which returns a Integer:
2016.toString().trim();Secound will be execute toString() method of integer class which returns an string:
"2016".trim();In Last trimming the stringwith trim() method of string class.