i didn't understand this method().method2() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

i didn't understand this method().method2()

R.layout.main i didn't understand the two dot notion.. i knew only calling var/method with single dot pls explain m().m2()

7th Jul 2018, 4:51 AM
Abdulahi Salaudeen
2 Answers
+ 4
The method probably returns an object, which has itsmown method method2
7th Jul 2018, 5:00 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
R is namespace for every Resource in your app, layout holds every .xml style file, main is just your layout which you've created. You can just read it like: from resources choose layout, and from layouts choose "main". Btw. In Java it's common practice to use Builder class and they do use a lot of dots :D
7th Jul 2018, 11:25 AM
Jakub Stasiak
Jakub Stasiak - avatar