•  
    Questions not Attemped
  •  
    Questions Attemped
  •  
    Questions Marked for review
  •  
    Current Question
00:00

Questions: 1/15

Question

Which of the following Array methods in JavaScript runs a function on every item in the Array and collects the result from previous calls, but in reverse?

options


Questions: 2/15

Question

Which of the following is true about setTimeOut()?

options


Questions: 3/15

Question

How can the operating system of the client machine be detected?

options


Questions: 4/15

Question

Which of the following prints "AbBc"?

options


Questions: 5/15

Question

Which of the following descriptions is true for the code below?

var object0 = {};
Object.defineProperty(object0, "prop0", { value : 1, enumerable:false, configurable : true });
Object.defineProperty(object0, "prop1", { value : 2, enumerable:true, configurable : false });
Object.defineProperty(object0, "prop2", { value : 3 });
object0.prop3 = 4;

options


Questions: 6/15

Question

Performance-wise, which is the fastest way of repeating a string in JavaScript?

options


Questions: 7/15

Question

Consider the following variable declarations:

var a="adam"
var b="eve"

Which of the following would return the sentence "adam and eve"?

options


Questions: 8/15

Question

Which of the following code snippets will correctly split "str"?

options


Questions: 9/15

Question

Which object can be used to ascertain the protocol of the current URL?

options


Questions: 10/15

Question

Which of the following best describes a "for" loop?

options


Questions: 11/15

Question

Which of the following descriptions best describes the code below?

options


Questions: 12/15

Question

Which of the following is not a valid HTML event?

options


Questions: 13/15

Question

Analyze the following code snippet which uses a Javascript Regular Expression character set. What will be the output of this code?





var str = "Is this enough?";
var patt1 = new RegExp("[^A-J]");
var result = str.match(patt1);
document.write(result);





options


Questions: 14/15

Question

Consider the following image definition:

options


Questions: 15/15

Question

What is the final value of the variable bar in the following code?

var foo = 9;
bar = 5;
(function() {
var foo = 2;
bar= 1;
}())
bar = bar + foo;

options


Questions: 1/15

Question

Given
10. class Foo {
11. static void alpha() { /* more code here */ }
12. void beta() { /* more code here */ }
13. }
Which two statements are true? (Choose two.)

options


Questions: 2/15

Question

Given

12. public class Yippee2 {
13.
14. static public void main(String [] yahoo) {
15. for(int x = 1; x < yahoo.length; x++) {
16. System.out.print(yahoo[x] + " ");
17. }
18. }
19. }
and the command line invocation:
java Yippee2 a b c
What is the result

options


Questions: 3/15

Question

Given:

15. public class Yippee {
16. public static void main(String [] args) {
17. for(int x = 1; x < args.length; x++) {
18. System.out.print(args[x] + " ");
19. }
20. }
21. }
and two separate command line invocations:
java Yippee
java Yippee 1 2 3 4
What is the result?

options


Questions: 4/15

Question

Given a class Repetition:

1. package utils;
2.
3. public class Repetition {
4. public static String twice(String s) { return s + s; }
5. }
and given another class Demo:
1. // insert code here
2.
3. public class Demo {
4. public static void main(String[] args) {
5. System.out.println(twice("pizza"));
6. }
7. }
Which code should be inserted at line 1 of Demo.java to compile and run Demo to print "pizzapizza"?

options


Questions: 5/15

Question

A JavaBeans component has the following field:
11. private boolean enabled;
Which two pairs of method declarations follow the JavaBeans standard for accessing this field? (Choose two.)

options


Questions: 6/15

Question

Given classes defined in two different files:

1. package util;
2. public class BitUtils {
3. public static void process(byte[]) { /* more code here */ }
4. }
1. package app;
2. public class SomeApp {
3. public static void main(String[] args) {
4. byte[] bytes = new byte[256];
5. // insert code here
6. }
7. }
What is required at line 5 in class SomeApp to use the process method of BitUtils?

options


Questions: 7/15

Question

Given:
enum Example { ONE, TWO, THREE }
Which statement is true?

options


Questions: 8/15

Question

Given:

11. public abstract class Shape {
12. private int x;
13. private int y;
14. public abstract void draw();
15. public void setAnchor(int x, int y) {
16. this.x = x;
17. this.y = y;
18. }
19. }
Which two classes use the Shape class correctly? (Choose two.)

options


Questions: 9/15

Question

Given:

10. class Nav{
11. public enum Direction { NORTH, SOUTH, EAST, WEST }
12. }
13. public class Sprite{
14. // insert code here
15. }
Which code, inserted at line 14, allows the Sprite class to compile?

options


Questions: 10/15

Question

Given:
35. String #name = "Jane Doe";
36. int $age = 24;
37. Double _height = 123.5;
38. double ~temp = 37.5;
Which two statements are true? (Choose two.)

options


Questions: 11/15

Question

Given:

55. int [] x = {1, 2, 3, 4, 5};
56. int y[] = x;
57. System.out.println(y[2]);
Which statement is true?

options


Questions: 12/15

Question

A programmer needs to create a logging method that can accept an
arbitrary number of arguments. For example, it may be called in these ways:

logIt("log message1");
logIt("log message2","log message3");
logIt("log message4","log message5","log message6");
Which declaration satisfies this requirement?

options


Questions: 13/15

Question

Which two code fragments correctly create and initialize a static array of int
elements? (Choose two.)

options


Questions: 14/15

Question

Given:

11. public static void main(String[] args) {
12. String str = "null";
13. if (str == null) {
14. System.out.println("null");
15. } else (str.length() == 0) {
16. System.out.println("zero");
17. } else {
18. System.out.println("some");
19. }
20. }
What is the result?

options


Questions: 15/15

Question

Given

11. public interface Status {
12. /* insert code here */ int MY_VALUE = 10;
13. }

options


Questions: 1/15

Question

Which of the following statements regarding WebSockets is true?

options


Questions: 2/15

Question

Assuming that some text needs to be written on an HTML5 canvas, select a replacement for the commented line below:

options


Questions: 3/15

Question

What is the role of the element in HTML5?

options


Questions: 4/15

Question

Which of the following is a possible way to get fullscreen video played from the browser using HTML5?

options


Questions: 5/15

Question

Consider the following items of a list:

options


Questions: 6/15

Question

The following are valid use cases of client file/directory access in HTML5, except:

options


Questions: 7/15

Question

Which of the following are the valid values of the element's target attribute in HTML5?

options


Questions: 8/15

Question

How does a button created by the tag differ from the one created by an tag?

options


Questions: 9/15

Question

Which method of HTMLCanvasElement is used to represent image of Canvas Element?

options


Questions: 10/15

Question

When does the ondragleave mouse event get fired in HTML5?

options


Questions: 11/15

Question

Once an application is offline, it remains cached until the following happens (select all that apply):

options


Questions: 12/15

Question

What is the internal/wire format of input type="date" in HTML5?

options


Questions: 13/15

Question

Which of the following is not a valid syntax for the element in HTML5?

options


Questions: 14/15

Question

What does P2P streaming mean when web applications establish a P2P HTTP connection using HTML?

options


Questions: 15/15

Question

Which of the following will detect when an HTML5 video has finished playing?

options


Previous Question

00:00