juan_gandhi: (VP)
[personal profile] juan_gandhi
s0.toUpperCase().contains(s1.toUpperCase)


guess what will happen

Date: 2015-03-09 06:50 pm (UTC)
From: [identity profile] triampurum.livejournal.com
там второй .toUpperCase будет вызван как метод с нулем аргументов, в contains попадет строка, будет Boolean на выходе. Другими словами, в scala вызовы метод со скобочками и без скобочек в этом вот случае эквивалентны с т.з. компилятора.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

November 2025

S M T W T F S
       1
23456 7 8
9 1011 12 1314 15
16171819 202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 20th, 2025 01:20 pm
Powered by Dreamwidth Studios