Bloomberg LP Interview Question
There are two different types of clipboard - system and local.
To access the system clipboard, assign a reference from the system clipboard to the Clipboard class
you need to use:
A. java.awt.Toolkit.getDefaultToolkit().getSystemClipboard()
For local Clipboard you could use answer C but I believe the constructor needs a String
so it would need to be:
new java.awt.datatransfer.Clipboard(“My Clipboard”)
Ref: docs.oracle.com
Accessing the system clipboard or creating a local clipboard is different but straightforward.
a.) java.awt.Toolkit.getDefaultToolkit().getSystemClipboard()
- vvarshne August 03, 2011