The second problem of the wrong arrangement

Source: Internet
Author: User

1. On the index.jsp page, the code that can be correctly filled in at the horizontal line is ()

<%@ page language= "java" pageencoding= "Utf-8" ___________%>

<%

Date Date=new date ()

%>

<%=date%>

A:import= "Java.uitl.*"

B:import= "Java.uitl.Date"

C:package= "Java.uitl.Date"

D:package= "Java.uitl.*"

The correct answer is: AB

Parsing: Only import is used in the page tag to rewind the package

2. The following statement about the set is wrong

A:colloection interface stores a set of unordered, non-unique objects

The B:set interface stores a unique, unordered set of objects

The C:list interface stores a set of not unique, ordered objects

The D:map interface stores a set of key-value objects where key is ordered, but not repeatable, and value does not require order, but can be repeated

Correct answer: D

Parsing: Two implementation classes under the map interface HashMap and Treemap,treemap stored data is ordered, if the same key value of the data, the previous deposit data will be overwritten!

3. The following statements about the life cycle of the servlet are wrong ()

A: A Servlet object is instantiated once every request is received by the server

B:servlet obtaining client requests through HttpServletRequest

C: You cannot use the Dopost () method to disassemble parameters directly when passing parameters using a URL

The life cycle of the d:servlet consists of instantiating the Servlet object, invoking the Init method, executing the service method, and finally executing the Detory method

Correct answer: A

Parsing: Servlets are singleton, regardless of how many requests a Servlet object will only be instantiated once, multithreaded operations

4. With regard to the Math object in JavaScript, it is correct to say: ()

A:math.ceil (512.51) returned with a result of 512

B:math.floor () is rounded down

C:math.round (-512.51) Returns the result is-512

D:math.random () Returns the result 0~1 values 0 and 1

Correct answer: B

Analytical:

Alert (Math.ceil (num));//returns the smallest integer greater than or equal to NUM, alert (Math.floor (num));/returns the largest integer less than or equal to num; alert (Math.Round (num));// Returns the nearest integer (rounded) to Num. Alert (Math.random ());//Returns a pseudo-random number between 0 and 1. The resulting pseudo-random number between 0 and 1 (including 0 without 1), alert (Math.ceil (num));//returns the smallest integer greater than or equal to NUM, alert (Math.floor (num));//returns the largest integer less than or equal to num ; Alert (Math.Round (num));//returns the integer nearest to num (rounded). Alert (Math.random ());//Returns a pseudo-random number between 0 and 1. The generated pseudo-random number between 0 and 1 (including 0 does not contain 1);

The second problem of the wrong arrangement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.