Tag: web technology

Questions Related to web technology

Given: 12. public class AccountManager { 13. private Map accountTotals = new HashMap(); 14. private int retirementFund; 15. 16. public int getBalance(String accountName) { 17. Integer total = (Integer) accountTotals.get(accountName); 18. if (total == null) 19. total = Integer.valueOf(0); 20. return total.intValue(); 21. } 23. public void setBalance(String accountName, int amount) { 24. accountTotals.put(accountName, Integer.valueOf(amount)); 25. } 26. } This class is to be updated to make use of appropriate generic types, with no changes in behavior (for better or worse). Which of these steps could be performed? (Choose three.)

  1. Replace line 13 with private Map accountTotals = new HashMap();

  2. Replace line 13 with private Map accountTotals = new HashMap();

  3. Replace line 13 with private Map> accountTotals = new HashMap>();

  4. Replace lines 17–20 with int total = accountTotals.get(accountName); if (total == null) total = 0; return total;

  5. Replace lines 17–20 with Integer total = accountTotals.get(accountName); if (total == null) total = 0; return total;

  6. Replace line 24 with accountTotals.put(accountName, amount);


Correct Option: B,E,F
  1. ArrayList input = null; ArrayList output = null;

  2. ArrayList input = null; List output = null;

  3. ArrayList input = null; List output = null;

  4. List input = null; ArrayList output = null;

  5. List input = null; List output = null;

  6. List input = null; List output = null;


Correct Option: B,E,F

Base products are installed separately.

  1. True

  2. False


Correct Option: A
  1. declarations

  2. scriptlets

  3. expressions

  4. All of the above


Correct Option: D

How many implicit objects in jsp?

  1. 4

  2. 7

  3. 9

  4. 8


Correct Option: C
  1. Both a and b

  2. None of the above


Correct Option: C

What are the life cycle methods in jsp?

  1. jspInit()

  2. jspservice()

  3. jspDestroy()

  4. All of the above


Correct Option: D

How many types of text formats in jsp?

  1. Static Content

  2. Dynamic content

  3. Both a and b

  4. None of the above


Correct Option: C