The document contains 6 questions about JavaScript, Java, HTML5 and CSS3. Key points:
1) Question 1 is about ensuring a single keyboardHandler function handles all keystrokes in a JavaScript game. Option 4 achieves this.
2) Question 2 is about testing if explicit GC calls cause performance issues in a Java application. Option 3 disables explicit GC calls.
3) Question 3 describes a CSS3 box-shadow property that creates a blue shadow offset by 3px and blurred by 5px. Option 5 describes this property.
4) Question 4 is about validating required fields on an HTML5 form using CSS. Option 5 adds/removes a classList based on field values.
The document contains 6 questions about JavaScript, Java, HTML5 and CSS3. Key points:
1) Question 1 is about ensuring a single keyboardHandler function handles all keystrokes in a JavaScript game. Option 4 achieves this.
2) Question 2 is about testing if explicit GC calls cause performance issues in a Java application. Option 3 disables explicit GC calls.
3) Question 3 describes a CSS3 box-shadow property that creates a blue shadow offset by 3px and blurred by 5px. Option 5 describes this property.
4) Question 4 is about validating required fields on an HTML5 form using CSS. Option 5 adds/removes a classList based on field values.
The document contains 6 questions about JavaScript, Java, HTML5 and CSS3. Key points:
1) Question 1 is about ensuring a single keyboardHandler function handles all keystrokes in a JavaScript game. Option 4 achieves this.
2) Question 2 is about testing if explicit GC calls cause performance issues in a Java application. Option 3 disables explicit GC calls.
3) Question 3 describes a CSS3 box-shadow property that creates a blue shadow offset by 3px and blurred by 5px. Option 5 describes this property.
4) Question 4 is about validating required fields on an HTML5 form using CSS. Option 5 adds/removes a classList based on field values.
The document contains 6 questions about JavaScript, Java, HTML5 and CSS3. Key points:
1) Question 1 is about ensuring a single keyboardHandler function handles all keystrokes in a JavaScript game. Option 4 achieves this.
2) Question 2 is about testing if explicit GC calls cause performance issues in a Java application. Option 3 disables explicit GC calls.
3) Question 3 describes a CSS3 box-shadow property that creates a blue shadow offset by 3px and blurred by 5px. Option 5 describes this property.
4) Question 4 is about validating required fields on an HTML5 form using CSS. Option 5 adds/removes a classList based on field values.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1/ 4
1. A developer is creating an online game using HTML5, CSS3 and java script.
The player will use the
keyboard to play the game. The developer wants all keystrokes to be first handled by a single function, even if other keyboard events are handled. Which of the following JavaScript snippets can be used to ensure a single function call keyboardHandler() is first to get all keystrokes? 1. window.addEventListener('keydown',keyboardHandler, true); 2. window.addEventListener('keydown',keyboardHandler); 3. window.addEventListener('keydown',keyboardHandler, false); 4. window.addEventListener('keydown',keyboardHandler); 5. window.addKeyEventListener('keydown',keyboardHandler, false);
2. In a java SE environment, garbage collection is causing performance problems and it is suspected that the problems are caused by the some of the applications making explicit calls to System.gc().Which of the following JVM arguments can be used to test this theory? 1. -XX:+UseParallelGC 2. -XX:+UseConcMarkSweepGC 3. -XX:+DisableExplicitGC 4. -XX:+UseParNewGC 5. -Xverify:none
3. Which of the following CSS3 snippets will create a shadow behind an HTML5 element that has an offset 3px, a blur of 5px and is blue? 1. box-shadow-offset: 3px; box-shadow-blur: 5px; box-shadow-colour: blue; 2. box-shadow: 3px, 3px, 5px, blue; 3. shadow-offset: 3px; shadow-blur: 5px; shadow-color: blue; 4. box-shadow: 3px 5px blue; 5. box-shadow: 3px 3px 5px blue;
4. A developer is creating an HTML5 Web page that includes a form for the user to complete. Some of the fields on the form must be completed. The required fields must be highlighted when no input has been made, and then changed when populated. A CSS3 style called fieldRequired is created that contains the requires style attributes and values and is applied to each required field. Which of the following actions will be completed to meet these requirements? 1. Create an event handler to respond to the onBlur event of each required field and delete the style fieldRequired with style.remove('fieldRequired'), or add the style using style.add('fieldRequired') if the field is cleared by the user. 2. Create an event handler to respond to the onBlur event of each required field and call classList.toggle('fieldRequired'). 3. Create an event handler to respond to the onBlur event of each required field and delete the style fieldRequired with style = null, or add the style using style = 'fieldRequired' if the field is cleared by the user. 4. Create an event handler to respond to the onBlur event of each required field and delete the style fieldRequired with style = null, or add the style using style.add('fieldRequired') if the field is cleared by the user. 5. Create an event handler to respond to the onBlur event of each required field and remove the style fieldRequired using classList.remove('fieldRequired'), or add the style using classList.add('fieldRequired') if the field is cleared by the user.
5. Java hibernate developer must create a web application that allows users to search and view a company's existing catalog. The catalog is stored in a database. The devloper successfully tests the applicataion. however, when the application is moved to the production environment, users are getting an out-of-memory error. which of the following actions can solve the problem? 1. Purge expired catalog items from the existing database. 2. Update the search features to use hibernate batch processing.*- (used in insertion of data) -* 3. Update the existing database to use a distributed configuration. 4. Update the search feature to only return a subset of the items based on an administrator defined limit. 5. Update the hibernate mapping to use Lazy fetching.
6. The javascript code snippnet below is inside a web page.This page will have an iframe element inside the div element with id "demo" where a series of pages (demo1.html,demo2.html,demo3.html,demo4.html) will be shown in sequence every 10 seconds.which of the following replace **1** , **2** and **3** provide the expected results?
<html>
<head>
<body>
<p> these are our pages</p>
<div id="meno"></div>
<script>
(function()
{
var cycle={'demo1.html','demo2.html','demo3.html',demo4.html'};
8. Which of the following statements correctly describe java.util.Spliterator?
1. A concrete class that implements a Spliterator must define the characteristics,estimateSize, tryAdvance, trySplit and forEach. 2. The println method of Spliterator can be used to print each of the remaining elements. 3. A Spliterator can be used to partition an arrayList. 4. A Spliterator is an iterator that splites its elements into components using the method reference provided to its constructor. 5. The trySplit method of Spliterator returns a Spliterator containing elements removed from the original Spliterator.