A programmer needs to create a logging method that can accept an arbitrary number of arguments.Forexample,it may be called in these ways: logIt("log message 1"); logIt("log message 2”,”log message 3"); logIt("log message 4","log message 5","log message 6"); Which declaration satisfies this requirement()?
- Apublic void logIt(String*msgs)
- Bpublic void logIt(String[]msgs)
- Cpublic void logIt(String...msgs)
- Dpublic voidl ogIt(Stringmsg1,Stringmsg2,Stringmsg3)