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)