




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. Which Domino component is responsible for interpreting Java agents on the server? A) Notes Client B) Domino Designer C) Domino Server Runtime D) XPages Engine Answer: C Explanation: The Domino Server Runtime provides the execution environment for Java agents, handling class loading, security, and recycling. Question 2. In the Notes Java API, which class represents the entry point for all other objects such as Database and Document? A) NotesFactory B) Session C) AgentContext D) DominoObject Answer: B Explanation: The Session object is the root; it provides methods to obtain Database objects, manage security, and control recycling.
Question 3. Which JAR file must be added to the Java project's classpath to access the Domino NCAPI? A) domjava.jar B) notes.jar C) lotus.jar D) dominoapi.jar Answer: B Explanation: notes.jar contains the classes for the Domino Java API (NCAPI) and is required for compilation and runtime. Question 4. When creating a new document in a Domino database via Java, which method is used to obtain a blank Document object? A) Database.openDocument() B) Session.createDocument() C) Database.createDocument() D) AgentContext.newDocument() Answer: C Explanation: Database.createDocument() returns a new, unsaved Document instance ready for field population.
Question 7. Which class is used to manipulate date‑time values in Domino Java code? A) java.util.Date B) java.time.LocalDateTime C) lotus.domino.DateTime D) NotesDate Answer: C Explanation: lotus.domino.DateTime provides time‑zone aware methods and integrates with Domino’s internal date handling. Question 8. When adding an attachment to a rich‑text field, which method of RichTextItem is used? A) embedObject() B) attachFile() C) embedObject(EMBED_ATTACHMENT, "", "path", "") D) addAttachment() Answer: C Explanation: embedObject with EMBED_ATTACHMENT inserts a file as an attachment in a RichTextItem.
Question 9. Which of the following statements about multi‑value fields is true? A) They can only contain numbers. B) replaceItemValue overwrites the entire list. C) appendItemValue adds a single value without affecting existing ones. D) Both B and C are correct. Answer: D Explanation: replaceItemValue replaces the whole item, while appendItemValue adds a new entry to an existing multi‑value field. Question 10. What is the purpose of the recycle() method in Domino Java objects? A) To delete the object from the NSF. B) To release native memory and avoid leaks. C) To serialize the object for network transfer. D) To commit changes to the database. Answer: B Explanation: recycle() frees the underlying C++ resources, preventing memory leaks especially in long‑running agents.
Question 13. Which method of View returns a collection of all documents in that view? A) getAllEntries() B) getAllDocuments() C) getDocumentCollection() D) getAllItems() Answer: B Explanation: View.getAllDocuments() yields a DocumentCollection containing every document the view indexes. Question 14. What is the difference between ViewEntry and Document objects? A) ViewEntry is lighter and contains only indexed column data; Document contains the full item set. B) Document is lighter; ViewEntry contains attachments. C) Both are identical; they are just different class names. D) ViewEntry can only be used in XPages. Answer: A Explanation: ViewEntry represents a row in a view with column values, while Document holds all items, making it heavier.
Question 15. Which method allows you to retrieve a view entry by its key value? A) view.getEntryByKey(key) B) view.getDocumentByKey(key) C) view.findEntry(key) D) view.lookup(key) Answer: A Explanation: View.getEntryByKey(Object key) returns the first matching ViewEntry for the given key. Question 16. To perform a full‑text search on a Domino database, which method should be called? A) database.search() B) view.FTSearch() C) database.FTSearch(query) D) session.FTSearch(query) Answer: C Explanation: Database.FTSearch(String query) runs a full‑text search and returns a DocumentCollection of matches.
Question 19. Which security identifier determines the access rights of a Java agent running on the Domino server? A) Agent ID B) Server ID C) Agent Signer ID D) User ID Answer: C Explanation: The Agent Signer ID’s ACL entry defines the privileges the agent inherits during execution. Question 20. When configuring an IDE for Domino development, which built‑in feature of Domino Designer simplifies Java class creation? A) Automatic JAR generation B) Java Class Wizard C) Server‑Side Java Compiler D) Managed Bean Designer Answer: B Explanation: Domino Designer includes a Java Class Wizard that generates skeleton classes, including package declarations and imports.
Question 21. Which method is used to lock a document for exclusive access in a Java agent? A) document.lock() B) document.acquireLock() C) document.lock(boolean) D) document.lock(NotesConstants.LOCK_EXCLUSIVE) Answer: A Explanation: Document.lock() attempts to obtain an exclusive lock; returns true if successful. Question 22. Which class provides the ability to send a mail document programmatically? A) MailDocument B) NotesMail C) Document (with Form="Memo") D) EmailHelper Answer: C Explanation: Creating a Document with the form name "Memo" and setting required fields (SendTo, Subject, Body) allows sending mail via document.send().
Question 25. When using Server‑Side JavaScript (SSJS) to call a Java class, which statement is true? A) SSJS can only call static methods. B) SSJS must import the class with importPackage. C) SSJS can instantiate Java objects directly using new. D) SSJS cannot interact with the Domino API. Answer: C Explanation: SSJS can create Java objects (var helper = new com.example.Helper();) and invoke instance or static methods. Question 26. Which Domino object method returns the total number of entries in a view without iterating? A) view.getEntryCount() B) view.getCount() C) view.getEntryCollection().getCount() D) view.getSize() Answer: B Explanation: View.getCount() returns the number of rows (entries) the view currently contains.
Question 27. Which method of DocumentCollection allows you to retrieve the next document in the collection? A) getNextDocument() B) getNext() C) getFirstDocument() D) getDocumentNext() Answer: A Explanation: DocumentCollection.getNextDocument() returns the subsequent document after the current one. Question 28. Which of the following is a correct way to retrieve a view by its alias name? A) database.getView("AliasName") B) database.getViewByAlias("AliasName") C) database.getView("($Alias)") D) database.getViewByName("AliasName") Answer: A Explanation: Database.getView(String viewName) works with both view names and aliases.
Question 31. Which method is used to add a new column value to a ViewEntry object? A) setColumnValue() B) addColumnValue() C) setValue() D) ViewEntry objects are read‑only; you cannot modify column values directly. Answer: D Explanation: ViewEntry is a read‑only representation of a view row; column values are derived from the underlying document. Question 32. In Java agents, which call retrieves the name of the server on which the agent is running? A) session.getServerName() B) agentContext.getServerName() C) database.getServer() D) notesFactory.getServer() Answer: C Explanation: Database.getServer() returns the server name for the database that the agent is executing against.
Question 33. Which of the following is NOT a valid trigger type for a Domino Java agent? A) Scheduled (time‑based) B) On document creation C) On view refresh D) Manually from the client Answer: C Explanation: Agents cannot be triggered by a view refresh; they can be scheduled, event‑driven, or manually run. Question 34. What is the effect of calling document.computeWithForm(false, false)? A) Forces the document to re‑evaluate its form formulas. B) Skips form formula computation and does not update computed fields. C) Saves the document without validation. D) Locks the document for editing. Answer: B Explanation: The first boolean disables formula computation; the second disables updating of computed fields.
Question 37. Which method of Database returns a View object that is sorted by a column value at runtime? A) getViewSortedByColumn() B) getView("ViewName").refresh() C) getView("ViewName").setAutoUpdate(true) D) Views cannot be re‑sorted at runtime via Java; sorting is defined in the view design. Answer: D Explanation: View sorting is defined in design; Java can only change the order of a ViewEntryCollection, not the view definition itself. Question 38. What does the Document.isResponse() method indicate? A) The document is a response document to another document. B) The document is a response to a view update. C) The document is a response to an agent execution. D) The document has been replied to by a user. Answer: A Explanation: isResponse() returns true if the document’s $REF item points to a parent document, making it a response.
Question 39. Which of the following statements about NotesException error codes is true? A) A negative error code always indicates a system failure. B) Error code 0 means success. C) The error code can be retrieved via NotesException.id. D) All error codes are strings. Answer: C Explanation: NotesException.id returns the integer error code associated with the exception. Question 40. In an XPage, which EL expression would retrieve a managed bean named orderBean in view scope? A) #{orderBean} B) ${orderBean} C) #{viewScope.orderBean} D) #{orderBeanBean} Answer: C Explanation: #{viewScope.orderBean} accesses a bean stored in the view scope map.