Tag: technology

Questions Related to technology

  1. a) remove the object and its collections from the first level cache

  2. b) remove the object and its collections from the second level cache

  3. c) remove the object and its collections from the data base

  4. d) None of the above


Correct Option: A

Which is simplest code snippet you will add in the below main function to set the name attribute of 50th in the ItemList to “Done”? import java.util.ArrayList; import java.util.List; class Item { public int code; public String name; public Item(String name) { this.name = name; } } public class Main { public static void main(String args[]) { List itemList = new ArrayList(); for (int i = 0; i < 50; i++) { Item im = new Item("Test"); itemList.add(im); } //Code to change name of the 50th object to “Done” } }

  1. im.name = "Done";

  2. Item otherObject = new Item(“Done”); itemList.set(49, otherObject);

  3. ((Item)itemList.get(49)).name = “Done”;

  4. None of above is correct as they are not changing 50th element.


Correct Option: A

Which three SELECT statements display 2000 in the format "$2,000.00"? (Choose three.)

  1. SELECT TO_CHAR(2000, '$#,###.##') from dual

  2. SELECT TO_CHAR(2000, '$0,000.00') from dual

  3. SELECT TO_CHAR(2000, '$9,999.00') from dual

  4. SELECT TO_CHAR(2000, '$9,999.99') from dual

  5. SELECT TO_CHAR(2000, '$2,000.00') FROM dual;

  6. SELECT TO_CHAR(2000, '$N,NNN.NN') FROM dual;


Correct Option: B,C,D

AI Explanation

To answer this question, we need to understand the syntax and usage of the TO_CHAR function in Oracle.

The TO_CHAR function is used to convert a number or date to a character string. It takes two arguments: the number or date to be converted and the format model specifying the desired format of the output.

Let's go through each option to understand why it is correct or incorrect:

Option A) SELECT TO_CHAR(2000, '$#,###.##') from dual This option is incorrect because the format model '#,###.##' does not include the necessary formatting for the dollar sign and the required number of digits before and after the decimal point.

Option B) SELECT TO_CHAR(2000, '$0,000.00') from dual This option is correct because the format model '$0,000.00' specifies the dollar sign, the thousands separator, and two decimal places, which matches the required format.

Option C) SELECT TO_CHAR(2000, '$9,999.00') from dual This option is correct because the format model '$9,999.00' specifies the dollar sign, the thousands separator, and two decimal places. The '9' in the format model allows for the possibility of leading zeros.

Option D) SELECT TO_CHAR(2000, '$9,999.99') from dual This option is correct because the format model '$9,999.99' specifies the dollar sign, the thousands separator, and two decimal places. The '9' in the format model allows for the possibility of leading zeros.

Option E) SELECT TO_CHAR(2000, '$2,000.00') FROM dual; This option is incorrect because it specifies the exact value that needs to be displayed, rather than using a format model to convert the number to the desired format.

Option F) SELECT TO_CHAR(2000, '$N,NNN.NN') FROM dual; This option is incorrect because the format model '$N,NNN.NN' is not a valid format model in Oracle.

The correct answers are B, C, and D. These options provide the correct format for displaying 2000 as "$2,000.00".

  1. a) TRUE

  2. b) FALSE

  3. c) no matter

  4. d) none of the above


Correct Option: B
  1. a) Add printer and queues

  2. b) Add modem & flash drive

  3. c) Add printer alone

  4. d) Invalid command


Correct Option: A