Java Applets, AWT, and Web Services

Test your knowledge of Java applets, AWT graphics components, and web service concepts including SOAP, WSDL, and UDDI.

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

AppletViewer tool is available in which of the folder of JDK

  1. bin
  2. lib
  3. source
  4. class
Question 2 Multiple Choice (Single Answer)

Which is the method that starts the applet?

  1. main()
  2. destroy()
  3. init()
  4. repaint()
Question 3 Multiple Choice (Single Answer)

Which one of the following is a valid declaration of an applet?

  1. Public class MyApplet extends java.applet.Applet {
  2. public Applet MyApplet {
  3. public class MyApplet extends applet implements Runnable {
  4. public class MyApplet extends java.applet.Applet {
Question 4 Multiple Choice (Single Answer)

The means by which the browser and the applet communicates is

  1. AppletSkeleton interface
  2. AppletApplication interface
  3. AppletStub interface
  4. AppletWindow interface
Question 5 Multiple Choice (Single Answer)

To determine the width and height of an application, which of the following method is used?

  1. getWidthHeight()
  2. setWidthHeight()
  3. getSize()
  4. setHeightWidth()
Question 6 Multiple Choice (Single Answer)

All Applets must import java.applet and java.awt.

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

What tags are mandatory when creating HTML to display an applet?

  1. name, height, width
  2. code, name
  3. codebase, height, width
  4. code, height, width
Question 8 Multiple Choice (Single Answer)

What are the interfaces to deal with Applet applications?

  1. AppletContext, AppletConfig
  2. AppletContext, AppletStub, AudioClip
  3. AppletConfig, AppletStub, AudioClip
  4. AppletConfit,AppletStub, VideoClip
Question 9 Multiple Choice (Single Answer)

What are the Applet's life cycle methods?

  1. init(), start() and destroy()
  2. init(), start() and paint()
  3. init(), start(), paint(). stop() and destroy()
  4. init(), start() and stop()
Question 10 Multiple Choice (Single Answer)

What is the color of the line, which is drawn by the following code snippet?
grph.setColor(Color.red.green.yellow.red.cyan);
grph.drawLine(0, 0, 100,100);

  1. Red
  2. Green
  3. Blue
  4. Cyan
Question 11 Multiple Choice (Single Answer)

What is the immediate super class of Applet class?

  1. Object
  2. Window
  3. Panel
  4. Component
Question 12 Multiple Choice (Single Answer)

The implementation-specific properties like ascent, descent of a font object is implemented by

  1. Font class
  2. Regular class
  3. FontMetrics class
  4. Graphics class
Question 13 Multiple Choice (Single Answer)

Which of the following objects are input to the paint() method?

  1. Canvas
  2. Graphics
  3. Paint
  4. Image
Question 14 Multiple Choice (Single Answer)

How to create TextArea with 80 character-width wide and 10 character-height tall?

  1. new TextArea(80, 10)
  2. new TextArea(10, 80)
  3. Both (1) and (2)
  4. None of these
Question 15 Multiple Choice (Single Answer)

Which Component method is used to access a component's immediate Container?

  1. getVisible()
  2. getImmediate()
  3. getParent()
  4. getContainer()
Question 16 Multiple Choice (Single Answer)

Which of the following creates a List with 3 visible items and multiple selection disabled?

  1. new List(3, false)
  2. new List(true, 3)
  3. new List(3, True)
  4. new List(false,3)
Question 17 Multiple Choice (Single Answer)

Window, Panel and ScrollPane are the subclasses of

  1. Container class
  2. Component class
  3. Frame class
  4. None of the above
Question 18 Multiple Choice (Single Answer)

Which of the following methods set the frame surface color to pink?

  1. setBackground(Color.pink);
  2. setColor(PINK);
  3. Background(pink);
  4. None of the above
Question 19 Multiple Choice (Single Answer)

Which layout is used as their default layout by Window, Frame and Dialog classes?

  1. CardLayout
  2. BorderLayout
  3. FlowLayout
  4. GridLayout
Question 20 Multiple Choice (Single Answer)

What is a web service?

  1. A standard way of integrating web-based applications
  2. One type of service that can be part of a Service Oriented Architecture
  3. Programmable XML-based service
  4. All of the above
Question 21 Multiple Choice (Single Answer)

Which of the following components allow multiple selections?

  1. Non-exclusive Checkboxes
  2. Radio buttons
  3. Choice
  4. Text Boxes
Question 22 Multiple Choice (Single Answer)

What are the web service platform elements?

  1. SOAP, UDDI, XML
  2. HTTP, WSDL
  3. UDDI, XML, SOAP
  4. SOAP, UDDI, WSDL
Question 23 Multiple Choice (Single Answer)

Coding and decoding, and transporting the data is performed by

  1. XML and UDDI respectively
  2. XML and SOAP respectively
  3. HTML and HTTP respectively
  4. HTML and SOAP respectively
Question 24 Multiple Choice (Single Answer)

Which of the following is used to locate and describe web services?

  1. SOAP
  2. Web page
  3. WSDL
  4. UDDI
Question 25 Multiple Choice (Single Answer)

Web services enables

  1. data can be exchanged between various applications and different platforms
  2. to resolve interoperability issues
  3. applications to function between two different operating systems server
  4. all of the above