欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

A programmer needs to create a logging method that can accept an arbitrary number of arguments. For example, it may be called in these ways: 
logIt(”log message 1 “); 
logIt(”log message2”,”log message3”); 
logIt(”log message4”, “log message5”, “log message6); 
Which declaration satisfies this requirement?()

    A. public void logIt(String * msgs)
    B. public void logIt(String [] msgs)
    C. public void logIt(String... msgs)
    D. public void logIt(String msg1, String msg2, String msg3)

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题