网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

Givenamethodthatmustensurethatitsparameterisnotnull:11.publicvoidsomeMethod(Objectvalue){12.//checkfornullvalue...20.System.out.println(value.getClass());21.}Whatinsertedatline12,istheappropriatewaytohandleanullvalue?()

A.assertvalue==null;

B.assertvalue!=null,"valueisnull";

C.if(value==null){thrownewAssertionException("valueisnull");}

D.if(value==null){thrownewIllegalArgumentException("valueisnull");}


参考答案

更多 “ Givenamethodthatmustensurethatitsparameterisnotnull:11.publicvoidsomeMethod(Objectvalue){12.//checkfornullvalue...20.System.out.println(value.getClass());21.}Whatinsertedatline12,istheappropriatewaytohandleanullvalue?()A.assertvalue==null;B.assertvalue!=null,valueisnull;C.if(value==null){thrownewAssertionException(valueisnull);}D.if(value==null){thrownewIllegalArgumentException(valueisnull);} ” 相关考题
考题 下面哪项不是application对象的方法()A、getAttribute(Stringname)B、getCookies()C、getInitParameter()D、setAttribute(Stringname,Objectvalue)

考题 下面哪项不是session对象的方法()A、getAttribute(Stringname)B、invalidate()C、getServletInfo()D、setAttribute(Stringname,Objectvalue)

考题 Givenamethodthatmustensurethatitsparameterisnotnull:What,insertedatline12,istheappropriatewaytohandleanullvalue?() A.assertvalue==null;B.assertvalue!=null:valueisnull;C.if(value==null){thrownewAssertionException(valueisnull);}D.if(value==null){thrownewIllegalArgumentException(valueisnull);}

考题 WhichHttpSessionmethodstoresanobjectinasession?() A.put(Stringname.Objectvalue)B.set(Stringname.Objectvalue)C.setAttribute(Stringname.Objectvalue)D.putAttribute(Stringname.Objectvalue)E.addAttribute(Stringname.Objectvalue)

考题 publicvoidsomeMethod(Objectvalue){12.//checkfornullvalue....20.System.out.println(value.getClass());21.}What,insertedatline12,istheappropriatewaytohandleanullvalue?() A.assertvalue==null;B.assertvalue!null,“valueisnull”;C.if(value==null){thrownewAssertionException(”valueisnull”);D.if(value==null){thrownewIllegalArgumentException(”valueisnull”);

考题 下列哪一组码是正交的?() A.(1,-1,-1,1)和(1,-1,-1,1);B.(1,-1,-1,1)和(1,1,1,1);C.(1,-1,-1,1)和(1,-1,-1,-1);D.(1,-1,-1,1)和(-1,1,1,-1)

考题 设置session的有效时间(也叫超时时间)的方法是()。A.setMaxInactiveInterval(int interval)B.getAttributeName()C.set AttributeName(String name,Java.lang.Object value)D.getLastAccessedTime()

考题 【单选题】设置session的有效时间(也叫超时时间)的方法是()。A.setMaxInactiveInterval(int interval)B.getAttributeName()C.set AttributeName(String name,Java.lang.Object value)D.getLastAccessedTime()

考题 Map中以下哪些是正确的方法?A.put(Object key, Object value)B.put(Object value, Object key)C.get(Object key)D.get(int index)