0

web technology Online Quiz - 137

Description: web technology Online Quiz - 137
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

Which of the following is true about SOAP?

  1. SOAP is for HTTP only

  2. SOAP can be used in combination with any protocol that can carry a SOAP envelope

  3. All the above

  4. none of the above


Correct Option: B

SOAP doesn't define a message exchange pattern

  1. a. true

  2. b. false, SOAP is completely a request/response protocol

  3. c. may be

  4. d. may not be


Correct Option: A

Characteristics of the Web Services programming model.

  1. a. Use Web protocols

  2. b. Are stateless

  3. c. Are loosely coupled

  4. Use XML as the universal data format

  5. e. a and c only

  6. f. all the above


Correct Option: F

Where is the correct place to insert a JavaScript in HTML Page?

  1. The section

  2. Both the section and the section are correct

  3. The section

  4. The section


Correct Option: B

How do you create a function?

  1. function:myFunction()

  2. function myFunction()

  3. function=myFunction()

  4. function=myFunction(){ }


Correct Option: B

What is the correct JavaScript syntax to insert a comment ?

  1. /This comment has more than one line/

  2. /This comment has more than one line//

  3. //This is a comment


Correct Option: A,D

How do you round the number 10.75, to the nearest integer?

  1. Math.rand(10.75)

  2. Math.round(10.75)

  3. rnd(10.75)

  4. Math.rnd(10.75)


Correct Option: B

How do you put a message in the browser's status bar?

  1. statusbar = "put your message here"

  2. window.status("put your message here")

  3. window.status = "put your message here"

  4. status("put your message here")


Correct Option: C

How can you find a client's browser name?

  1. client.navName

  2. navigator.browser

  3. browser.name

  4. navigator.appName


Correct Option: D

var d=new Date(); theDay=d.getDay(); switch (theDay) { case 2: document.write("Today is Saturday"); break; case 4: document.write("Finally Friday"); break; case 5: document.write("Super Saturday"); break; case 6: document.write("Sleepy Sunday"); default: document.write("I'm looking forward to this weekend!"); } If today is Saturday, what will be out of the above snippet

  1. Super Saturday

  2. Finally Friday

  3. Sleepy Sunday I'm looking forward to this weekend!

  4. Sleepy Sunday

  5. Today is Saturday


Correct Option: C

What is the correct way to write a JavaScript array?

  1. var txt = new Array="tim","kim","jim";

  2. var txt = new Array("tim","kim","jim");

  3. var txt = new Array:1=("tim")2=("kim")3=("jim")

  4. var txt = new Array(1:"tim",2:"kim",3:"jim")


Correct Option: B

What is the syntax which will display the image on the screen for 5 seconds?

  1. setTimeout('run()','50000');

  2. setTimer('run()','5');

  3. setTimeout('run()','500');

  4. setTimeout('run()','5000');


Correct Option: D

An external JavaScript must contain the tag?

  1. True

  2. False


Correct Option: A

How do you write a conditional statement for executing some code if "i" is equal to 5?

  1. if i==5 then

  2. if i=5

  3. if (i==5)

  4. if i=5 then


Correct Option: C
  1. abstract class C1{ public void m1(){ //1 }} abstract class C2{ public void m2(){ //2 }}
  1. compile time error at line1

  2. compile time error at line2

  3. The code compiles fine

  4. None of the above


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) compile time error at line 1 - This option is incorrect. There is no compile-time error at line 1. The code defines an abstract class called C1 and declares a method m1() in it. The method does not have a body (implementation) because it is marked as abstract. This is allowed in Java for abstract methods.

Option B) compile time error at line 2 - This option is incorrect. There is no compile-time error at line 2. The code defines another abstract class called C2 and declares a method m2() in it. Similar to the previous class, this method is also marked as abstract and does not have a body.

Option C) The code compiles fine - This option is correct. The code compiles without any errors. Both abstract classes, C1 and C2, are defined correctly, and their abstract methods are declared without any issues.

Option D) None of the above - This option is incorrect. The correct answer is option C, as explained above.

The correct answer is C) The code compiles fine. This option is correct because there are no compilation errors in the given code.

interface I{ void f1(); // 1 public void f2(); // 2 protected void f3(); // 3 private void f4(); // 4 abstract void f5(); // 5 }

  1. line 1,2,3,4

  2. line 3,4

  3. line 3

  4. line 2,3,4


Correct Option: B

abstract class vehicle{ abstract public void speed(); } class car extends vehicle{ public static void main (String args[]) { vehicle ob1; ob1=new car(); //1 }}

  1. compiletime error at line 1

  2. forces the class car to be declared as abstract

  3. Runtime Exception

  4. None of the above


Correct Option: B

class command { public static void main (String[] a1) { System.out.println(a1.length()); //1 System.out.println(a1[0]); //2 System.out.println(a1); //3 //2 }}

  1. compile time error at line1

  2. compile time error at line2

  3. compile time error at line3

  4. Runtime exception


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) compile time error at line 1 - This option is correct because the code tries to call the length method on the a1 array, which is incorrect. In Java, arrays do not have a length() method. Instead, the length of an array can be accessed using the length field without parentheses. Therefore, there will be a compile-time error at line 1.

Option B) compile time error at line 2 - This option is incorrect. The code correctly accesses the first element of the a1 array using the index 0.

Option C) compile time error at line 3 - This option is incorrect. The code correctly prints the reference to the a1 array.

Option D) Runtime exception - This option is incorrect. There are no runtime exceptions in the given code.

The correct answer is A) compile time error at line 1. This option is correct because the code tries to call the length method on the a1 array, which is incorrect. Arrays in Java do not have a length() method.

abstract class A {} // 1 transient class B {} // 2 private class C {} // 3 static class D {} // 4 Which of these declarations will not produce a compile-time error?

  1. 1

  2. 2

  3. 3

  4. 4


Correct Option: A
  1. What does CSS stand for?
  1. Computer Style Sheets

  2. Cascading Style Sheets

  3. Creative Style Sheets

  4. Colorful Style Sheets


Correct Option: B
- Hide questions