Java Applets, AWT, and Web Services
Test your knowledge of Java applets, AWT graphics components, and web service concepts including SOAP, WSDL, and UDDI.
Questions
AppletViewer tool is available in which of the folder of JDK
- bin
- lib
- source
- class
Which is the method that starts the applet?
- main()
- destroy()
- init()
- repaint()
Which one of the following is a valid declaration of an applet?
- Public class MyApplet extends java.applet.Applet {
- public Applet MyApplet {
- public class MyApplet extends applet implements Runnable {
- public class MyApplet extends java.applet.Applet {
The means by which the browser and the applet communicates is
- AppletSkeleton interface
- AppletApplication interface
- AppletStub interface
- AppletWindow interface
To determine the width and height of an application, which of the following method is used?
- getWidthHeight()
- setWidthHeight()
- getSize()
- setHeightWidth()
All Applets must import java.applet and java.awt.
- True
- False
What tags are mandatory when creating HTML to display an applet?
- name, height, width
- code, name
- codebase, height, width
- code, height, width
What are the interfaces to deal with Applet applications?
- AppletContext, AppletConfig
- AppletContext, AppletStub, AudioClip
- AppletConfig, AppletStub, AudioClip
- AppletConfit,AppletStub, VideoClip
What are the Applet's life cycle methods?
- init(), start() and destroy()
- init(), start() and paint()
- init(), start(), paint(). stop() and destroy()
- init(), start() and stop()
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);
- Red
- Green
- Blue
- Cyan
What is the immediate super class of Applet class?
- Object
- Window
- Panel
- Component
The implementation-specific properties like ascent, descent of a font object is implemented by
- Font class
- Regular class
- FontMetrics class
- Graphics class
Which of the following objects are input to the paint() method?
- Canvas
- Graphics
- Paint
- Image
How to create TextArea with 80 character-width wide and 10 character-height tall?
- new TextArea(80, 10)
- new TextArea(10, 80)
- Both (1) and (2)
- None of these
Which Component method is used to access a component's immediate Container?
- getVisible()
- getImmediate()
- getParent()
- getContainer()
Which of the following creates a List with 3 visible items and multiple selection disabled?
- new List(3, false)
- new List(true, 3)
- new List(3, True)
- new List(false,3)
Window, Panel and ScrollPane are the subclasses of
- Container class
- Component class
- Frame class
- None of the above
Which of the following methods set the frame surface color to pink?
- setBackground(Color.pink);
- setColor(PINK);
- Background(pink);
- None of the above
Which layout is used as their default layout by Window, Frame and Dialog classes?
- CardLayout
- BorderLayout
- FlowLayout
- GridLayout
What is a web service?
- A standard way of integrating web-based applications
- One type of service that can be part of a Service Oriented Architecture
- Programmable XML-based service
- All of the above
Which of the following components allow multiple selections?
- Non-exclusive Checkboxes
- Radio buttons
- Choice
- Text Boxes
What are the web service platform elements?
- SOAP, UDDI, XML
- HTTP, WSDL
- UDDI, XML, SOAP
- SOAP, UDDI, WSDL
Coding and decoding, and transporting the data is performed by
- XML and UDDI respectively
- XML and SOAP respectively
- HTML and HTTP respectively
- HTML and SOAP respectively
Which of the following is used to locate and describe web services?
- SOAP
- Web page
- WSDL
- UDDI
Web services enables
- data can be exchanged between various applications and different platforms
- to resolve interoperability issues
- applications to function between two different operating systems server
- all of the above