Tag: technology

Questions Related to technology

  1. Sum up value in the fields specified in the SORT FIELDS statement and keep it as only one occurence in the o/p

  2. Removes the duplicates for the fields specified in the SORT FIELDS statement and keeps only the 1st occurence of it

  3. Works only for those records in the i/p file where no duplicates for the fields specified in SORT FIELDS statement,

  4. None of the above


Correct Option: B
  1. SORT FIELDS = (1,10,CH,A),SKIPREC= 10

  2. SORT FILEDS = (1,10,CH,A),SIZE = 10

  3. Sort FIELDS = (1,10,CH,A),STOPAFT = 10

  4. Sort FIELDS = (1,10,CH,A),EQUALS = 10


Correct Option: C
  1. F (Fixed), V (Variable), D (ISCII/ASCII Variable)

  2. F (Fixed), V (Variable)

  3. No types are specified in the Record Statement

  4. FI (Fixed), VA (Variable)


Correct Option: A
  1. Function call:- changeName(im); Function implementation :- { im.name = "Done"; return null; }

  2. Function call:- changeName(im); Function implementation :- { im = new Item("Done"); return null; }

  3. Function call :- im = changeName(im); function implementation :- { Item otherObject = new Item("Done"); return otherObject; }

  4. All of the above


Correct Option: B
  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
  1. itemMap.remove("orange"); itemMap.put("orange", new Item("Orange") );

  2. ((Item)itemMap.get(“orange”)).name = “Orange”;

  3. itemMap.put("orange", new Item("Orange") );

  4. None of above


Correct Option: B
  1. code attribute cannot be changed as Item class doesn’t have setter method for it.

  2. for (int i = 0; i < itemList.size(); i++) { if(itemList.get(i) != null) { ((Item)itemList.get(i)).code = 50+i; } }

  3. int i = 0; Item im = null; while (i < itemList.size()) { im = (Item)itemList.get(i); if(im != null) { im.code = 50+i; } i++; }

  4. int i = 0; Item im = null; Iterator itr = itemList.iterator(); while (itr.hasNext()) { im =(Item) itr.next(); im.code = 50+i; i++; }


Correct Option: D
  1. SORT FIELDS=(1,5,ZD,A) OUTREC FIELDS=(1:SEQNUM,5,ZD,6:6,295)

  2. SORT FIELDS=(1,5,BI,A) OUTREC FIELDS=(1:SEQNUM,5,BI,6:6,295)

  3. SORT FIELDS=(1,5,ZD,A) OUTREC FIELDS=(1:RESEQ,5,ZD,6:6,300)

  4. None of the above


Correct Option: A