Java’s varargs are for unit tests
Posted on November 22, 2011 by Eric LEFEVRE-ARDANT
At the Devoxx conference on Java last week, Joshua Bloch (of Sun and Google fame) argued during his talk “The Evolution of Java: Past, Present, and Future” that varargs are only “somewhat useful”. I think he is overlooking some usages, particularly in tests.
Varargs in Java are a way to specify a variable number of parameters in a methods. Check our this detailed post on how varargs can make your unit tests a lot more readable.
No related posts.
Comments
Leave a Reply


Forum about the processing and research of information in companies. Beginner, experienced, member of the Lucene community or passionate about these subjects, find all the necessary information on PolySpot and its ecosystem. Find, share and stay informed with the PolySpot blog!

