This is a printer-friendly version. It omits exercises, optional topics (i.e., four-star topics), and other extra content such as learning outcomes.
Variable Arguments (Varargs) is a syntactic sugar type feature that allows writing a methods that can take a variable number of arguments.
The search
method below can be called as search()
, search("book")
, search("book", "paper")
, etc.
public static void search(String ... keywords){
// method body
}
Resources: