Docsity

Java in Notes Domino Applications Practice Exam, Exams of Technology

Toggle sidebar
bg1
Principal CLP516 Using Java in Notes Domino
Applicationss Practice Exam
**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.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Java in Notes Domino Applications Practice Exam and more Exams Technology in PDF only on Docsity!

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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().

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.

Applicationss Practice Exam

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.