Tag: web technology

Questions Related to web technology

For a REPEAT Operation to execute as long as the specified repeat condition remains true,the count parameter needs to be set to

  1. 1

  2. 0

  3. -1

  4. None


Correct Option: C
  1. webMethods Adapters

  2. webMethods Broker

  3. webMethods Developer

  4. webMethods Integration Server

  5. None of the Above


Correct Option: E

class C { public static void main(String[] args) { double d1 = Math.floor(0.5); double d2 = Math.floor(1.5); System.out.print(d1 + "," + d2); }}

  1. will print "Strin"

  2. will print "Stri"

  3. will cause compiler error

  4. none of the above


Correct Option: B

if("String".replace('t','T') == "String".replace('t','T')) System.out.println("Equal"); else System.out.println("Not Equal");

  1. will Print Equal

  2. will Print Not Equal

  3. compile time error

  4. none of the above


Correct Option: B

AI Explanation

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

Option A) will Print Equal - This option is incorrect because the statement in the if condition will evaluate to false, resulting in the "Not Equal" message being printed.

Option B) will Print Not Equal - This option is correct. The statement in the if condition will evaluate to false because the two expressions on either side of the equality operator are not equal.

Option C) compile time error - This option is incorrect. There is no compilation error in the given code.

Option D) none of the above - This option is incorrect. The correct answer is Option B.

The correct answer is B. The code will print "Not Equal" because the two expressions "String".replace('t','T') and "String".replace('t','T') are not equal.

Which of the following classes will not allow unsynchronized read operations by multiple threads?

  1. Vector

  2. TreeMap

  3. TreeSet

  4. HashMap

  5. HashSet


Correct Option: A
Explanation:

To answer this question, the user needs to have knowledge of Java's synchronized collections and multithreading.

Option A: Vector is a synchronized collection class, which means that multiple threads can read and write from it but only one thread can access it at a time. Therefore, unsynchronized read operations are not allowed by multiple threads in Vector.

Option B: TreeMap is not a synchronized collection class, and therefore, it does not provide thread-safety. Multiple threads can read and write to it at the same time, which means that unsynchronized read operations are allowed by multiple threads in TreeMap.

Option C: TreeSet is not a synchronized collection class, and therefore, it does not provide thread-safety. Multiple threads can read and write to it at the same time, which means that unsynchronized read operations are allowed by multiple threads in TreeSet.

Option D: HashMap is not a synchronized collection class, and therefore, it does not provide thread-safety. Multiple threads can read and write to it at the same time, which means that unsynchronized read operations are allowed by multiple threads in HashMap.

Option E: HashSet is not a synchronized collection class, and therefore, it does not provide thread-safety. Multiple threads can read and write to it at the same time, which means that unsynchronized read operations are allowed by multiple threads in HashSet.

Therefore, the answer is: A. Vector

  1. True

  2. False


Correct Option: B
Explanation:

The correct answer is:

B. False

StringBuffer objects in Java can be modified after they are created. StringBuffer is a mutable class that allows for the modification of its content. It provides various methods to append, insert, delete, and modify the character sequence it holds. Therefore, the statement "StringBuffer objects once created can not be modified" is false.