New in this group --- Question:why is it a common practice to use static import for methods?

37 views
Skip to first unread message

Sócrates

unread,
Nov 16, 2021, 12:42:21 PM11/16/21
to mockito
Hi guys, 
I'm new here, happy to join to help developing and learn from all you about mockito. 

I would like to ask, why is it a common practice to use static import for methods?

I feel that it is not so clean, just by avoiding the ClassName every time. But I think it is more readable and clean, any way. That is my perception.

Can you help with ideas to help me understand this, please?


Thanks,

--
Sócrates

rogerdpack

unread,
Jan 10, 2022, 12:42:51 PM1/10/22
to mockito
Yeah it's a bit more confusing.  For me it's because I use it SO MUCH that I might as well clean up the code for it...and you can always use your editor to "follow" where the method is coming from, so it's not ambiguous.
Reply all
Reply to author
Forward
0 new messages