Exam 2
The item marked ____ in the accompanying figure displays a form control of input type "text."
1
The item marked ____ in the accompanying figure is a selection list.
2
By default, the ____ tag displays one option from the selection list, along with a list arrow to view additional selection options.
<select>
Oscar owns Oscar's Skateboard Shop. He wants to create a Web form to allow users to specify the type of skateboards they would like to buy (allowing for more than one type). This includes the make, model, type and color, and board options. Oscar's skateboards come in Children, Young Adult, and Adult sizes. Oscar's skateboards only come in one color per skateboard, pattern, and themes. He has over 25 makes and models of skateboards. Since make and model are normally lists, Oscar should use a ____ tag to specify the lists.
<select>
Has methods for rounding numbers
Math object
Is Bootstrap 3 mobile-first? (T/F)
True
The Bootstrap grid system works across multiple devices. (T/F)
True
Which button class is used to create a large button? a. .btn-lg b. .btn-l c. .btn-xl d. .btn-large
a. .btn-lg
Which class indicates a dropdown menu? a. .dropdown b. .dropdown-list c. .select d. .select-list
a. .dropdown
The Bootstrap grid system is based on how many columns? a. 12 b. 16 c. 9 d. 6
a. 12
If number is 20, what is printed to the console after this code is executed? for (int i = 3; i <= number; i += 2) { if (number % i == 0) { System.out.println(i); if (i == number) System.out.println("special"); break; } } a. 5 b. 5 5 special c. 20 special d. 5 special e. 2
a. 5
int limit = 0; for (int i = 10; i >= limit; i -= 2) { for (int j = i; j <= 1; j++) { System.out.println("In inner for loop"); } System.out.println("In outer for loop"); } How many times does "In outer for loop" print to the console? a. 6 b. 8 c. 11 d. 10
a. 6
Assume that the variable named entry has a starting value of 9 and number has a value of 3. What is the value of entry after the following statements are executed? if ((entry > 9) || (entry/number == 3)) entry--; else if (entry == 9) entry++; else entry = 3; a. 8 b. 3 c. 10 d. 9
a. 8
A conditional comment uses ____ to specify the condition for Internet Explorer. a. <!-- [if condition IE version] > b. <!-- [condition IE ]> c. <!--[ version ]> d. none of the above
a. <!-- [if condition IE version] >
How can you insert a search icon? a. <span class="glyphicon glyphicon-search"></span> b. <span class="glyphicon-search"></span> c. <span class="glyphicon search"></span> d. <span class="glyph glyph-search"></span>
a. <span class="glyphicon glyphicon-search"></span>
A standard navigation tab is created with: a. <ul class="nav nav-tabs"> b. <ul class="nav nav-navbar"> c. <ul class="navigation-tabs"> d. <ul class="nav tabs">
a. <ul class="nav nav-tabs">
Which plugin is used to cycle through elements, like a slideshow? a. Carousel b. Orbit c. Slideshow d. Scrollspy
a. Carousel
________________ don't use the get and set methods of the class to get and set the values of the fields. Instead they access the fields directly. a. Field annotations b. Getter annotations c. Named parameters d. all of the above e. none of the above
a. Field annotations
To move the cursor through a result set, you can use the methods of the a. ResultSet object b. Statement object c. Connection object d. ResultSetMetaData object
a. ResultSet object
Why use Bootstrap? a. Saves time, responsiveness, customizable, easy layout design using grids, consistency, regular updates. b. Doesn't necessarily save time, but it does help with SEO, use of color, and marketing your site. c. It automatically includes ASP.NET and MS SQL Server that saves time, uses responsive design, and has regular updates. d. It automatically includes Java and MySQL that saves time, uses responsive design, and has regular updates.
a. Saves time, responsiveness, customizable, easy layout design using grids, consistency, regular updates.
What must you do if you code an infinite loop in an application? a. Stop the application to end the loop b. Use a counter variable to determine when the loop ends c. Code just a single statement within the loop d. Use a Boolean expression to determine when the loop ends
a. Stop the application to end the loop
Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at java.util.Scanner.nextDouble(Scanner.java:2324) at FutureValueApp.main(FutureValueApp.java:17) What caused the exception to occur? a. The user didn't enter the type of data the program was expecting. b. The program couldn't format the double value that the user entered. c. The program didn't compile properly. d. You can't tell from the information given.
a. The user didn't enter the type of data the program was expecting.
How does the Bootstrap 3 Grid System work? a. Twitter Bootstrap 3 introduces the responsive mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. b. Twitter Bootstrap 3 introduces the responsive mobile first fixed grid system that appropriately scales up to 16 columns as the device or viewport size increases. c. Twitter Bootstrap 3 introduces the responsive desktop first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. d. Twitter Bootstrap 3 introduces the responsive mobile first fluid grid system that appropriately scales up to 16 columns as the device or viewport size increases.
a. Twitter Bootstrap 3 introduces the responsive mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases.
Connection pooling improves database performance because a. a pool of connections are available for users of the application to share b. it only opens connections when they are needed c. a pool of servlet threads are allowed to access the database at one time d. it provides one connection for each thread of a servlet
a. a pool of connections are available for users of the application to share
Before a secure connection is established, the server uses a ________________ to authenticate itself. a. a server certificate b. none of the above c. both a and b d. a client certificate
a. a server certificate
In a while loop, the Boolean expression is tested a. before the loop is executed b. none of the above c. both before and after the loop is executed d. after the loop is executed
a. before the loop is executed
To code the equivalent of a Java if/else statement, you would use the ________________ tag. a. choose b. param c. if d. url
a. choose
A(n) ____ dialog box returns the result of a user's action as a Boolean value. a. confirm b. alert c. prompt d. cancel
a. confirm
To be able to access the body of a tag, the tag handler class needs to a. extend the BodyTagSupport class b. implement the BodyTagSupport interface c. implement the TagSupport interface d. extend the TagSupport class
a. extend the BodyTagSupport class
Which of the values below will not be printed to the console when this code is executed? outer: for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { if (i == j) continue outer; System.out.println("i = " + i + " j = " + j); } } a. i = 0 j = 1 b. i = 2 j = 1 c. i = 2 j = 0 d. i = 1 j = 0
a. i = 0 j = 1
Which of the values below will not be printed to the console when this code is executed? for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { if (i == j) continue; System.out.println("i = " + i + " j = " + j); } } a. i = 1 j = 1 b. i = 1 j = 0 c. i = 0 j = 1 d. i = 2 j = 0 e. i = 2 j = 1
a. i = 1 j = 1
If this code is used to parse an attribute named emailAddress that contains a value of jjones@[email protected] <c:forTokens var="part" items="${emailAddress}" delims="@"> ${part}<br> </c:forTokens> what is displayed in the browser? a. jjones net asset.com b. jjones net@asset com c. jjones [email protected] d. jjones net asset com
a. jjones net asset.com
Which of the following statements do you use to jump to the top of an outer loop from an inner loop? a. labeled continue b. break c. labeled break d. continue
a. labeled continue
Dates are numeric values measured in ____. a. milliseconds b. nanoseconds c. microseconds d. picoseconds
a. milliseconds
Derek Young wants to create a page that would have several dynamic effects. For instance, he wants a clock that shows how long the user has been viewing a page, plus he'd like a welcome message and a goodbye message on the page. He also has a list of links that should run his functions to update parts of the page. Derek wants to have the clock update every 10 seconds. Which method would be best for him to use to cause the script to run according to his schedule? a. setInterval b. setDelay c. setTimeout d. setTime
a. setInterval
As shown in the accompanying figure, each DOM organizes objects into a hierarchy known as a document ____. a. tree b. filter c. amalgam d. roster
a. tree
The result set retrieved by the following SELECT statement contains rows that have SELECT Balance, Num FROM Accounts WHERE Balance < 0 a. two columns from the Accounts table where Balance column is less than 0 b. two columns from the Balance table where the Num column is less than 0 c. one column from the Balance table where the Num column is less than 0 d. all columns from the Accounts table where the Balance column is less than 0
a. two columns from the Accounts table where Balance column is less than 0
In naming a variable, the first character must be either a letter or a(n) ____. a. underscore b. pound sign c. number sign d. ampersand
a. underscore
A digital secure certificate is provided a. usually for a fee from a certificate authority b. for a fee from a registration authority c. free from a registration authority d. free from a certificate authority
a. usually for a fee from a certificate authority
Performs simple calculations
arithmetic operator
Which class provides a responsive fixed width container? a. .container-fluid b. .container c. .container-fixed d. .fixed-container
b. .container
Which class provides a full width container, spanning the entire width of the viewport? a. .container b. .container-fluid c. .container-fixed d. .fluid-container
b. .container-fluid
Which class is used to create a basic list group? a. .grouped-list b. .list-group c. .group-list d. .list-grouped
b. .list-group
Which class adds zebra-stripes to a table? a. .even and .odd b. .table-striped c. .table-bordered d. .table-zebra
b. .table-striped
What is the value of routeNumber after the following statement is executed if the value of zipCode is 93705? switch (zipCode) { case 93705: case 93706: routeNumber = 1; break; case 93710: case 93720: routeNumber = 2; break; default: routeNumber = 0; break; } a. 0 b. 1 c. 2 d. undefined
b. 1
int limit = 0; for (int i = 10; i >= limit; i -= 2) { for (int j = i; j <= 1; j++) { System.out.println("In inner for loop"); } System.out.println("In outer for loop"); } How many times does "In inner for loop" print to the console? a. 5 b. 2 c. 0 d. 1 e. 7
b. 2
After running the following code, what value does x contain? x = new Date("October 31, 2011 11:22:05"); x = x.getMinutes(); a. 31 b. 22 c. 11 d. 22.5
b. 22
How many lines are printed on the console when the following for loops are executed? for (int i = 1; i < 5; i += 2) { for (int j = 0; j < i; j++) { System.out.println(j); } } a. 2 b. 4 c. 5 d. 20
b. 4
To specify that a business class is an entity, you use the ________________ annotation. a. @Id b. @Entity c. none of the above d. @GeneratedValue
b. @Entity
Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at java.util.Scanner.nextDouble(Scanner.java:2324) at FutureValueApp.main(FutureValueApp.java:17) What is the order of method calls? a. only the main() method is called b. FutureValueApp.main calls java.util.Scanner.nextDouble calls java.util.Scanner.next calls java.util.Scanner.throwFor c. you can't tell from the information given d. java.util.Scanner.throwFor calls java.util.Scanner.next calls java.util.Scanner.nextDouble calls FutureValueApp.main
b. FutureValueApp.main calls java.util.Scanner.nextDouble calls java.util.Scanner.next calls java.util.Scanner.throwFor
________________ use the get and set methods of the class to get and set the values of the fields. a. Field annotations b. Getter annotations c. Named parameters d. all of the above e. none of the above
b. Getter annotations
What is the main reason for using a generic data validation method? a. It runs faster than validation code in the main method. b. It saves you from writing variations of the same code again and again to check multiple data entries. c. It prevents NumberFormatExceptions from being thrown. d. None of the above.
b. It saves you from writing variations of the same code again and again to check multiple data entries.
A(n) ____ composition is smaller than a WAV or an MP3 file, but cannot include speech. a. MP3 b. MIDI c. AIFF d. WAV
b. MIDI
Sadie Helman runs a Web site for amateur snowboarders. She likes to post videos and music related to snowboarding on her site as well as interviews with different snowboarding professionals. For her stereo-recorded audio interviews, Sadie should use the ____ file format a. SND b. MP3 c. MIDI d. AU
b. MP3
What are the benefits and deterrents to using Bootstrap CDN versions? a. One benefit is there is a local (relative) path to the files within your subdirectories. b. One benefit is they provide the latest compiled and minified versions of the necessary files. c. One deterrent is they don't provide the latest compiled and minified versions of the necessary files. d. One benefit is that development is permitted without an Internet connection.
b. One benefit is they provide the latest compiled and minified versions of the necessary files.
Which protocol is used to transfer a message from a mail server and to a mail client? a. IMAP b. POP c. MIME d. SMTP
b. POP
If a tag doesn't have a body, the doStartTag method should return the a. EVAL_PAGE field b. SKIP_BODY field c. EVAL_BODY_INCLUDE field d. SKIP_PAGE field
b. SKIP_BODY field
In a do-while loop, the Boolean expression is tested a. before the loop is executed b. after the loop is executed c. none of the above d. both before and after the loop is executed
b. after the loop is executed
In a left outer join, the result set includes a. all rows in the second table and matched rows in the first table b. all rows in the first table and matched rows in the second table c. matched rows in both tables and unmatched rows in the second table d. matched rows in both tables and unmatched rows that don't contain nulls
b. all rows in the first table and matched rows in the second table
Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at java.util.Scanner.nextDouble(Scanner.java:2324) at FutureValueApp.main(FutureValueApp.java:17) What is this output called? a. an exception hierarchy b. an exception handler c. a method log d. a stack trace
b. an exception handler
"maxLength" is an example of ____. a. an event function b. camel case c. an object method d. an index value
b. camel case
JavaScript is ____, so you must pay attention to whether or not letters are capitalized. a. case insensitive b. case sensitive c. case indifferent d. none of the above
b. case sensitive
A Java program is stored in an executable file called a(n) ____ file. a. exe b. class c. java d. js
b. class
Once you establish a secure connection, the application a. continues to use a secure connection until until a relative URL specifies a non-secure connection b. continues to use a secure connection until an absolute URL specifies a non-secure connection c. uses absolute URLs to continue using the secure connection d. returns to a non-secure connection for subsequent requests
b. continues to use a secure connection until an absolute URL specifies a non-secure connection
Consider the following code: function showBirthday(birthday) { thisDay = birthday.getDate(); thisMonth = birthday.getMonth()+1; thisYear = birthday.getFullYear(); return thisMonth + "/" + thisDay + "/" + thisYear; } What type of parameter must birthday be? a. time object b. date object c. check object d. none of the above
b. date object
A(n) ____ is a statement that tells browsers what code to run in response to a specified event. a. event script b. event handler c. unary operator d. element attribute
b. event handler
The structure shown in the accompanying figure is the object ____. a. dictionary b. hierarchy c. glossary d. roster
b. hierarchy
When an email is sent it goes from the a. mail client software to the receiving mail client to the receiving client's mail server, and then to that client's mail server software b. mail client software to that client's mail server software to the receiving client's mail server, and then to the receiving mail client. c. mail client software to that client's mail server software to the receiving mail client, and then to the receiving client's mail server. d. none of the above
b. mail client software to that client's mail server software to the receiving client's mail server, and then to the receiving mail client.
A function includes its ____, which are values used by the function. a. terms b. parameters c. ids d. names
b. parameters
MySQL is a/an ________________ that can manage one or more databases. a. Data Manipulation Language (DML) b. relational database management system (RDMS) c. Data Definition Language (DDL) d. Structured Query Langage (SQL)
b. relational database management system (RDMS)
When you code a script that contains more than one statement, you must code a/an ________________ at the end of each statement. a. colon b. semicolon c. period d. comma
b. semicolon
Because you can set inline styles using the style attribute, CSS styles also can be set in the document object model through the use of the JavaScript ____ property. a. className b. style c. src d. htmlFor
b. style
To display the body of the tag in the JSP, a. the tag class should return the EVAL_BODY_BUFFERED constant b. the tag class should return the EVAL_BODY_INCLUDE constant c. the tag class should return the SKIP_BODY constant d. none of the above
b. the tag class should return the EVAL_BODY_INCLUDE constant
The number of TLDs an application can have is a. 1 b. unlimited c. 5 d. 300
b. unlimited
Requires two operands
binary operator
Which class shapes an image to a circle? a. .img-thumbnail b. .img-rounded c. .img-circle d. .img-round
c. .img-circle
Legend Films is planning to create a page that will allow users to email their video requests for the studio to add to their online video offerings. External files containing JavaScript commonly use the extension ____. a. .java b. .script c. .js d. .jsp
c. .js
Which class is used to create a big box for calling extra attention? a. .bigbox b. .container c. .jumbotron d. .bigcontainer
c. .jumbotron
Which contextual class indicates a succesful or positive action? a. .text-primary b. .text-warning c. .text-success d. .text-info
c. .text-success
Which class indicates uppercased text? a. .text-capitalize b. .ucase c. .text-uppercase d. .uppercase
c. .text-uppercase
If this code is used for the href attribute of a link, <c:url value='/cart' > <c:param name='productCode' value='8601' /> </c:url> what URL is used for the link? a. /cart?8601 b. /cart c. /cart?productCode=8601 d. /cart/productCode=8601
c. /cart?productCode=8601
How many lines are printed on the console when the following for loop is executed? for (int i = 2; i < 10; i++) { System.out.println(i); } a. 9 b. 7 c. 8 d. 10
c. 8
What is Bootstrap? a. Bootstrap is an HTML, CSS, and JS framework for developing distributed version control projects on the web. b. Bootstrap is an HTML, CSS, and JS framework for developing desktop first, then responsive/mobile projects for the web. c. Bootstrap is an HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. d. Bootstrap is an HTML, CSS, JS, and ASP.NET framework for developing responsive, mobile first projects on the web.
c. Bootstrap is an HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
How to use Bootstrap? a. Download Bootstrap, link any CSS files just above the closing body tag, link any JS files below the opening body tag, and use the min.js files because they have better documentation. b. Download Bootstrap, link any CSS files between the body tags, link any JS files above the opening body tag, and use the regular .js files because they have smaller file sizes and load faster. c. Download Bootstrap, link any CSS files between the head tags, link any JS files above the ending body tag, and use the min.js files because they have smaller file sizes and load faster. d. Download Bootstrap, link any CSS files between the head tags, link any JS files above the ending body tag, but don't use the min.js files because they have larger file sizes and don't load as fast.
c. Download Bootstrap, link any CSS files between the head tags, link any JS files above the ending body tag, and use the min.js files because they have smaller file sizes and load faster.
Sadie Helman runs a Web site for amateur snowboarders. She likes to post videos and music related to snowboarding on her site as well as interviews with different snowboarding professionals. Which would be the best format for Sadie to use for her videos so that they are compatible with the most browsers and can be displayed in YouTube? a. AVI b. RealVideo c. Flash Video d. QuickTime
c. Flash Video
________________ is an object-oriented query language defined as part of the JPA specification. a. DDL (data definition language) b. DML (data manipulation language) c. JPQL (Java Persistence Query Language) d. none of the above e. all of the above
c. JPQL (Java Persistence Query Language)
Given the following code: var result = 10/"A"; document.write(result); What value will be displayed? a. N/A b. NonN c. NaN d. infinity
c. NaN
Which protocol is used to send a message from one mail server to another? a. MIME b. IMAP c. SMTP d. POP
c. SMTP
A tag that has a body must have a. an opening tag b. a closing tag c. all of the above d. none of the above e. a body
c. all of the above
When a statement within a try block causes an exception, the remaining statements in the try block a. are executed after the statements in the catch block b. are executed no matter what c. aren't executed d. are executed before the statements in the catch block
c. aren't executed
To code a tag handler that uses attributes, you must a. define a set method for each attribute with the standard naming conventions b. declare a private instance variable for each attribute c. both a and b d. none of the above
c. both a and b
You can use custom tags a. with attributes, and with a repeating body b. with a body, and without a body c. both a and b d. none of the above
c. both a and b
ActiveX controls are identified using the ____ attribute. a. src b. classelem c. classid d. data
c. classid
A Web document itself is associated with ____ such as the action of being loaded or unloaded by the browser. a. objects b. scripts c. events d. handler
c. events
To loop through most types of collections, including regular arrays, you would use the ________________ tag. a. forTokens b. param c. forEach d. all of the above e. none of the above
c. forEach
To loop through items in a delimited string, you would use the ________________ tag. a. forEach b. param c. forTokens d. all of the above e. none of the above
c. forTokens
Legend Films is planning to create a page that will allow users to email their video requests for the studio to add to their online video offerings. The Web designer would like to create code that could be used in each movie new release page to count down to the release. Where should he place the code to make it easy to reuse? a. in a script tag b. in the head of the document c. in an external file d. none of the above
c. in an external file
Sara's Custom Drapery Design shop has an online order form. She has added some JavaScript functions to calculate how much a person has to pay before they submit the page, and now wants to add her functions to her form buttons. Sara gets complaints that customers are seeing NaN in certain places. What function can help her stop that from happening? a. isFiN b. isNumber c. isNaN d. isFinite
c. isNaN
Which is not true about MySQL? a. it can protect access to your data so only authorized users can view the data b. all of the above c. it does not support referential integrity or transaction processing. d. it supports SQL
c. it does not support referential integrity or transaction processing.
Which of the following statements do you use to jump to the end of an outer loop from an inner loop? a. break b. labeled continue c. labeled break d. continue
c. labeled break
In the statement that follows, x can NOT be what data type? switch(x){statements} a. string b. int c. long d. byte
c. long
Sara's Custom Drapery Design shop has an online order form. She has added some JavaScript functions to calculate how much a person has to pay before they submit the page, and now wants to add her functions to her form buttons. Which event is best used for her buttons? a. ondblclick b. onkeypress c. onclick d. onmouseout
c. onclick
The INSERT statement that follows inserts INSERT INTO Download (UserID, DownloadDate, DownloadFilename, ProductCode) VALUES (1, NOW(), 'jr01_filter.mp3', 'jr01') a. one row and three columns into the Download table b. four rows and one column into the Download table c. one row and four columns into the Download table d. four rows and four columns into the Download table
c. one row and four columns into the Download table
Derek Young wants to create a page that would have several dynamic effects. For instance, he wants a clock that shows how long the user has been viewing a page, plus he'd like a welcome message and a goodbye message on the page. He also has a list of links that should run his functions to update parts of the page. The goodbye message will most likely involve using the ____ event. a. onenter b. onexit c. onunload d. onload
c. onunload
A(n) ____ dialog box returns the text entered into the dialog box by the user. a. error b. alert c. prompt d. confirm
c. prompt
When a browser makes an initial attempt to communicate with a server over a secure connection, the server authenticates itself by a. confirming the identity of the client b. decrypting all data c. providing a digital secure certificate to the client d. authorizing the client
c. providing a digital secure certificate to the client
If ps is a PreparedStatement object and product is a Product object, then the following statement ps.setDouble(3, product.getPrice()); a. sets the Price variable to a value of 3 b. sets the Price column to a value of 3 c. sets the third parameter in the prepared statement to the value that's returned by the getPrice method d. sets the third column in the prepared statement to the value that's returned by the getPrice method
c. sets the third parameter in the prepared statement to the value that's returned by the getPrice method
To execute the DELETE statement that follows, which statement would you use? String query = "DELETE FROM Invoices " + "WHERE InvoiceTotal = 0 "; Statement statement = connection.createStatement(); a. statement.executeDelete(query); b. statement.executeQuery(query); c. statement.executeUpdate(query); d. statement.executeStatement(query);
c. statement.executeUpdate(query);
If the variables named price and rate are doubles and qty is an int, what is a possible declaration for the getTax method that's called by the statement that follows? double tax = TaxCalculator.getTax(price, rate, qty); a. static void getTax(double price, double rate, int qty) b. static double getTax(double price, int qty, double rate) c. static double getTax(double x, double y, int z) d. static double getTax(price, rate, qty)
c. static double getTax(double x, double y, int z)
The maximum SSL strength for an application's connections is determined by a. the registration authority b. the certification authority c. the digital secure certificate d. the SSL methods that you use
c. the digital secure certificate
When using this code: Address bccAddress = new InternetAddress("[email protected]"); message.setRecipient(Message.RecipientType.BCC, bccAddress); a. the message will go to multiple recipients b. the email address will appear in the message c. the email address will not appear in the message d. none of the above
c. the email address will not appear in the message
What is the value of maxNumber after the code that follows is executed? int number = 0; int maxNumber = 0; for (int i = 0; i <= 10; i++) { number = (int)(Math.random() * 100); if (number >= maxNumber) { maxNumber = number; } } a. the largest of eleven random numbers from 100 to 1000 b. the largest of ten random numbers from 0 to 99 c. the largest of eleven random numbers from 0 to 99 d. the largest of ten random numbers from 100 to 1000
c. the largest of eleven random numbers from 0 to 99
Consider the following condition. It will be true when (!endProgram.equalsIgnoreCase("n")) a. the value of endProgram doesn't equal "n" b. the value of endProgram equals "n" c. the value of endProgram doesn't equal "n" or "N" d. the value of end Program equals "n" or "N"
c. the value of endProgram doesn't equal "n" or "N"
"maxLength" is an example of ____.
camelCase
The item marked 5 in the accompanying figure is a ____ box.
check
Oscar should use ____ to allow users to select the skateboard type(s).
check boxes
Used to create expressions that return true or false
comparison operator
An operator that executes a test
conditional operator
As shown in the accompanying figure, the form contains ____ elements, which are commonly used in Web page forms.
control
Which class is used to create a button group? a. .button-group b. .group-btn c. .group-button d. .btn-group
d. .btn-group
Which class is used to create a basic pagination? a. .page b. .pages c. .navigation d. .pagination
d. .pagination
Which contextual class indicates a dangerous or potentially negative action? a. .text-warning b. .text-primary c. .text-info d. .text-danger
d. .text-danger
What happens in the method that follows when s is "two"--i.e., *not* the number (2)? public double parseInterval(String s) { double interval = 0.0; try { interval = Double.parseDouble(s); } catch(NumberFormatException e) { } return interval; } a. a compile-time error occurs since the catch block isn't properly coded b. no value is returned since the catch block doesn't return a value c. 2.0 is returned d. 0.0 is returned
d. 0.0 is returned
How many lines are printed on the console when the following for loop is executed? for (int j = 10; j < 40; j *= 2) { System.out.println(j); } a. 3 b. 4 c. 1 d. 2
d. 2
What is the value of the variable named counter after the statements that follow are executed? double percent = 0.54; boolean valid = true; int counter = 1; if ((percent > 0.50) && (valid == true)) { counter += 2; if (valid == true) counter++; else if (percent >= 0.50) counter += 3; } else counter++; a. 7 b. 3 c. 2 d. 4
d. 4
If x has the value 5.1356, x.toFixed(3) returns what value? a. 5.13 b. $5.135 c. $5.13 d. 5.136
d. 5.136
What is the value of x after the following statements are executed? int x = 5; switch(x) { case 5: x += 2; case 6: x++; break; default: x *= 2; break; } a. 6 b. 7 c. 10 d. 8 e. 16
d. 8
Legend Films is planning to create a page that will allow users to email their video requests for the studio to add to their online video offerings. In order to add the date to the form, the Web designer could use the ____ object. a. Math b. Comparison c. Arithmetic d. Date
d. Date
Which class in the following list of classes are all exceptions subclasses of? a. Throwable b. Error c. RuntimeException d. Exception
d. Exception
How to Create Layouts with Twitter Bootstrap 3 Grid System. Twitter Bootstrap 3 includes predefined grid classes for quickly making grid layouts for different types of devices: a. Extra small devices (phones ≥768px), Small devices (tablets <768px), Medium devices (desktops ≥1092px), Large devices (desktops ≥1500px) b.Extra small devices (phones <768px), Medium devices (desktops ≥992px), Large devices (desktops ≥1200px) c. Extra small devices (phones <768px), Small devices (tablets ≥768px), Large devices (desktops ≥1200px) d. Extra small devices (phones <768px), Small devices (tablets ≥768px), Medium devices (desktops ≥992px), Large devices (desktops ≥1200px)
d. Extra small devices (phones <768px), Small devices (tablets ≥768px), Medium devices (desktops ≥992px), Large devices (desktops ≥1200px)
What is the third line printed to the console in the code that follows? int items = 3; for (int i = 1; i <= items; i++) { int result = 1; for (int j = i; j >= 1; j--) { result *= j; } System.out.println("Factorial " + i + " = " + result); } a. Factorial 4 = 24 b. Factorial 1 = 1 c. Factorial 2 = 4 d. Factorial 3 = 6
d. Factorial 3 = 6
To specify how the result set should be sorted, you use the ________________ clause. a. WHERE b. SELECT c. FROM d. ORDER BY
d. ORDER BY
To get information about a result set like the number of columns and names of the columns, you can use the methods of the a. Statement object b. Connection object c. ResultSet object d. ResultSetMetaData object
d. ResultSetMetaData object
CREATE DATABASE and DROP DATABASE are a. foreign keys b. MySQL commands c. result sets d. SQL statements
d. SQL statements
Which plugin is used to create a tooltip? a. Modal b. Popup c. Dialog Box d. Tooltip
d. Tooltip
An open source format introduced by Google to provide royalty-free video and audio to be used with the HTML5 video element is ____. a. Flash Video b. MP4 c. Ogg Theora d. WebM
d. WebM
When is the code within a catch block executed? a. When a runtime error occurs b. When the code in the try block doesn't compile c. When the try block finishes executing d. When the exception specified in the catch block is thrown in the try block
d. When the exception specified in the catch block is thrown in the try block
The getXXX methods can be used to return ________________ of the eight primitve types. a. one b. two c. none d. all
d. all
A Session object contains information about the mail session such as a. the protocol b. the host c. the port d. all of the above e. none of the above
d. all of the above
An example of mail client software would be a. the email app on a mobile device b. the Microsoft Outlook application on a computer c. Gmail in a web browser d. all of the above e. none of the above
d. all of the above
For each scripting variable, you create a VariableInfo object that provides this data: a. a true/false value that tells whether the variable needs to be declared b. the scope of the variable c. the name and data type of the variable d. all of the above e. none of the above
d. all of the above
For the data type of a scripting variable, you can specify a a. any wrapper class for a primitive type b. String object c. any primitive data type d. all of the above e. none of the above
d. all of the above
In a SQL injection attack, an attacker can attempt to a. execute SQL statements against your database b. modify data c. delete data d. all of the above
d. all of the above
SSL strength can depend on a. the strength supported by the browser b. the strength supported by the web server c. the strength provided by the certificate d. all of the above
d. all of the above
To determine the cause of an unhandled exception, you can a. use the name of the exception class that's displayed b. use the error message that's displayed c. use the information in the stack trace d. all of the above
d. all of the above
To specify the relationships between your business classes, you can use the ________________ annotation. a. @OneToMany b. @ManyToOne c. @OneToOne d. all of the above e. none of the above
d. all of the above
Which is a JPA implementation? a. Hibernate b. EclipseLink c. TopLink d. all of the above e. none of the above
d. all of the above
Which of the following classes define exceptions that can occur in a Java application? a. ArithmeticException b. NumberFormatException c. NullPointerException d. all of the above e. none of the above
d. all of the above
You can use the ________________ methods of the entity manager to insert, update, and delete data. a. persist b. merge c. remove d. all of the above e. none of the above
d. all of the above
A(n) ____ operator can be used to perform simple mathematical calculations. a. conditional b. logical c. ordinal d. arithmetic
d. arithmetic
To use a secure connection, you need to a. install a digital secure certificate on your web server b. configure your web server so it defines a secure connection c. none of the above d. both a and b
d. both a and b
You can use a logical operator to a. combine two Boolean expressions b. determine if two expressions are equal c. reverse the value of an expression d. both a and c e. all of the above
d. both a and c
You code an access modifier on a static method to indicate if it a. accepts parameters b. returns a value c. is overloaded d. can be called from other classes
d. can be called from other classes
Unlike an if/else statement, a switch statement a. can't test for a default condition b. can't be nested within another switch statement c. none of the above d. can't perform an operation based on the result of a Boolean expression
d. can't perform an operation based on the result of a Boolean expression
To specify a named parameter in a JPQL query string, code a/an ________________ followed by the name of the parameter. a. semicolon (;) b. question mark (?) c. none of the above d. colon (:)
d. colon (:)
Sara's Custom Drapery Design shop has an online order form. She has added some JavaScript functions to calculate how much a person has to pay before they submit the page, and now wants to add her functions to her form buttons. Sara wants to display the total from her calcTotal() function in her form named results in a text box called finalAmount. What will the command look like? a. results.finalAmount.document.value = calcTotal(); b. document.finalAmount.results = calcTotal(); c. document.finalAmount.results.value = calcTotal(); d. document.results.finalAmount.value = calcTotal();
d. document.results.finalAmount.value = calcTotal();
Assume the user enters "X" at the first console prompt when the following code is executed. The numOfEntries will be String option = ""; int numOfEntries = 0; do { numOfEntries++; System.out.print("Enter 'C' to continue."); option = sc.next(); } while (choice.equalsIgnoreCase("C")); a. none of the above b. greater than one c. equal to zero d. equal to one
d. equal to one
Ted Soy maintains a Web site for his brother's T-shirt company, Ted's Customized T-Shirts. The T-shirt company has decided to incorporate an interactive puzzle on the Web site. Ted has created three puzzles and stored them as multidimensional arrays. Ted wants all of the JavaScript code placed outside of the Web document in the same way that all of the CSS styles are placed in a(n) ____ style sheet file. a. internal b. inner c. outer d. external
d. external
To create a self-signed certificate, you need to create a/an ________________ file. a. none of the above b. HTML c. JAR d. keystore
d. keystore
Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at java.util.Scanner.nextDouble(Scanner.java:2324) at FutureValueApp.main(FutureValueApp.java:17) Which statement would you look at to find the source of the problem? a. line 818 in the Scanner class b. line 2324 in the Scanner class c. line 1420 in the Scanner class d. line 17 in the FutureValueApp class
d. line 17 in the FutureValueApp class
In Java, exceptions are a. statements b. classes c. compile-time errors d. objects
d. objects
Derek Young wants to create a page that would have several dynamic effects. For instance, he wants a clock that shows how long the user has been viewing a page, plus he'd like a welcome message and a goodbye message on the page. He also has a list of links that should run his functions to update parts of the page. Derek will most likely use which event to display his welcome message? a. onenter b. onexit c. onunload d. onload
d. onload
Unlike a data type, a reference type a. contains data b. points to the data in another variable c. none of the above d. points to the data in another area of internal storage
d. points to the data in another area of internal storage
Before you can use a custom tag, you must code a taglib directive in the JSP. Within this directive, the URI attribute must specify a. the name of the tag b. the scripting variables of the tag c. the location of the tag handler class d. the location of the TLD file
d. the location of the TLD file
To use SSL to transmit data, the ________________ must provide authentication. a. both the client and the server b. the client c. none of the above d. the server
d. the server
You should validate user entries rather than catch and handle exceptions caused by invalid entries whenever possible because a. data validation code should only be used for situations that are truly exceptional b. all of the above c. you can more accurately determine the cause of an invalid entry d. your code will run faster
d. your code will run faster
Retrieves information from a date object
date method
Created using Date();
date object
The has methods of the Scanner class let you a. check if the user has entered data at the console b. check if the data entered at the console can be converted to a specific data type c. retrieve and discard data that isn't required by the application d. all of the above e. a and b only
e. a and b only
When you call a method with a parameter list, the arguments in the argument list a. must be coded in the same sequence as the parameters b. must be declared with the same data types as the parameters c. have the same names as the parameters d. all of the above e. a and b only
e. a and b only
To handle an exception using the try statement, you must a. code a try block around the statement that may throw the exceptions b. code a finally block that contains the statements that will be executed at the end of the try statement c. code a catch block that contains the statements that you want to be executed when the exception occurs d. all of the above e. a and c only
e. a and c only
To code the equivalent of a Java if statement, you would use the ________________ tag. a. url b. choose c. forEach d. all of the above e. none of the above
e. none of the above
Tells browsers what code to run
event handler
A ____ should be used to provide visual indication that option buttons belong in the same group.
fieldset
Wyona wants to separate the different options for straw, leather and material. Which element can she use to create these groups?
fieldset
Can be placed before or after an operand
increment operator
Larry has just bought an online Web hosting solution from a popular ISP. He knows the ISP provides some scripts to allow people to create logon pages for their Web site if they want to have a password-protected blog, for example. Larry wants to create such a page for his blog about video games. Which element will Larry most likely use to create the password element?
input
Wyona wants to label each group. Which element would be the best for her to use?
legend
Allows you to connect several expressions
logical operator
For her address she wants to make sure the zipcode is set to 5 characters only. Which attribute of a text box will allow her to do this?
maxlength
Changes an item's sign
negation operator
The items marked 3 in the accompanying figure are ____ buttons.
option
What type of method will Larry most likely be using for submitting his form data?
post
For the color, Oscar should most likely use ___.
radio buttons
A _____ is a concise description of a character pattern.
regular expression and regex
The element to which specific style rules in a style sheet apply is called a ____.
selector
Another way you can specify the width is to use the ____ attribute.
size
The item marked 4 in the accompanying figure is a(n) ____ button.
spinner control
The item marked 6 in the accompanying figure is a ____ area.
text
Wyona, owner of Wyona's Hat Designs, desires to have a Web site built for customers to order custom-made hats. They can pick from straw, leather, and material hat collections. Customers can specify one of their existing patterns, which include about 50 designs. They can also choose a custom pattern instead and then provide information about the pattern they want for Wyona to custom create. In order to provide customers plenty of room to enter the information for a custom pattern, which type of field should Wyona provide for the user?
text area
Requires one operand
unary operator