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

September 2025

S M T W T F S
 1 2345 6
78 9 10 111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 14th, 2025 03:55 pm
Powered by Dreamwidth Studios