• Post Reply Bookmark Topic Watch Topic
  • New Topic

some questions  RSS feed

Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1: Untrusted code (i.e. that has been downloaded by a browser) can ONLY do one of the following. Which?
a) Read the user.name system property so that it can address the user by name.
b) Read files which are marked as publicly readable from the local file system.
c) Read the os.name system property to find the name of the operating system it is running on.
d) Create directories.
2: In order to move smoothly from one graphics frame to the next, you need:
a) to be able to "undraw" moving objects from their old position on the screen just before you redraw them in their new position
b) to use java.awt.zbuffer rather than java.awt.graphics components
c) a "double buffered" frame buffer card
d) to draw to an offscreen canvas and then copy the canvas in a single call to the drawImage method.
3: In the Abstract Windowing Toolkit, the origin of a frame is always at:
a) Bottom Left
b) Bottom Right
c) In the Center of the frame
d) Top Left
4: If you write an interactive applet that uses "MouseMoved" rather than "MouseMove", how do you restrict your audience?
a) Users of Internet Explorer will not be able to use your applets, as "MouseMoved" resides in a package not supported on that browser.
b) Provided that you also provide a "MouseDragged" method, you will not be imposing any restrictions.
c) Users of Netscape will not be able to use your applets, as "MouseMoved" is an extension added in J++ by Microsoft.
d) Users of earlier Java-enabled browsers will not be able to run your applets since "MouseMoved" was added at Java 1.1.
5: Resource bundles are a convenient way to:
a) Collect settings together for database access, so that you don't have to keep re specifying unchanged parameters for each SQL query
b) Obtain classes for use in your Java programs, knowing they'll be written to a specific standard. It's also a good way to encourage others to reuse your classes.
c) Group AWT components so that they're laid out neatly on the screen.
d) Translate messages, keystrokes, short cuts, etc into a variety of different languages
6: To find how wide a character string will appear in your AWT window, use:
a) the getLength method on a FontMetrics object
b) the stringWidth method on a FontMetrics object
c) the getWidth method on a FontMetrics object
d) multiple calls to the charWidth method on a FontMetrics object
7: In order to use a bean, you need access to:
a) A .java file for the bean
b) The .class file for the bean
c) A beanbox, such as Sun's BDK
d) A secure connection to a server, or a signed certificate
8: Which of these is a predefined colour?
a) Color.grey
b) Color.fuschia
c) Color.teal
d) Color.darkGray
9: Which layout manager would you use to lay out a regular set of buttons, such as a telephone dial pad?
a) flow
b) gridbag
c) equal
d) grid
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!