Java Applet and GUI Programming

Covers Java applet programming, AWT components (TextField, TextArea, MouseEvent, WindowEvent), event handling, JDBC database operations, and core Java concepts including data types and the main method.

16 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following Java support systems is a program that provides access to WWW and runs Java applets?

  1. Web server
  2. Web browser
  3. APPLET tag
  4. None of these
Question 2 Multiple Choice (Single Answer)

Which of the following Java development kits allows us to run Java applets without using Java compatible browser?

  1. Java
  2. Javac
  3. Appletviewer
  4. Jdb
Question 3 Multiple Choice (Single Answer)

Which of the following features of C++ is/are supported by Java?

  1. Operator overloading
  2. Template classes
  3. Pointers
  4. Destructor function
Question 4 Multiple Choice (Single Answer)

After compilation of the source program, Java enabled web browser is required to execute ___________ program.

  1. application
  2. applets
  3. assembled
  4. none of these
Question 5 Multiple Choice (Single Answer)

Classes in Java come under ___________ data type.

  1. primitive
  2. non-numeric
  3. non-primitive
  4. none of these
Question 6 Multiple Choice (Single Answer)

Which of the following methods of TextField class fills the field with string?

  1. getText()
  2. setEditable()
  3. setText()
  4. None of these
Question 7 Multiple Choice (Single Answer)

Which of the following methods in applet programming is used when you want the applet area to be redrawn?

  1. Paint()
  2. Repaint()
  3. Update()
  4. None of these
Question 8 Multiple Choice (Single Answer)

Which of the following classes in Applet programming defines WINDOW_ACTIVATED constant that can be used to identify them?

  1. Adapter classes
  2. MouseEvent Class
  3. WindowEvent Class
  4. None of these
Question 9 Multiple Choice (Single Answer)

Which of the following methods of MouseEvent classes obtains the number of mouse clicks for this event?

  1. translatePoint()
  2. getClickCount()
  3. isPopupTrigger()
  4. None of these
Question 10 Multiple Choice (Single Answer)

Which of the following components of an Event class is the method that understands the event and processes it?

  1. Event-handler
  2. Event source
  3. Event object
  4. None of these
Question 11 Multiple Choice (Single Answer)

Which of the following keywords in the declaration of the main method declares the method as one that belongs to the entire class and not a part of any object of the class?

  1. Public
  2. Static
  3. Void
  4. None of these
Question 12 Multiple Choice (Single Answer)

Which of the following languages was originally called 'Oak'?

  1. C++
  2. Java
  3. PL-1
  4. None of these
Question 13 Multiple Choice (Single Answer)

Which of the following back-end tools provides database programming interface for Java programs?

  1. ODBC
  2. JDBC
  3. JDBC Driver Manager
  4. None of these
Question 14 Multiple Choice (Single Answer)

Which of the following methods of InputStream class returns the number of bytes that are available for reading from the input stream?

  1. read()
  2. available()
  3. close()
  4. None of these
Question 15 Multiple Choice (Single Answer)

Which of the following methods is used in Java to execute a SQL statement that may return multiple results?

  1. executeQuery()
  2. execute()
  3. executeUpdate()
  4. None of these
Question 16 Multiple Choice (Single Answer)

Which of the following declarations of TextArea() method creates a text area of rows specified and width to accommodate the specified character?

  1. TextArea()
  2. TextArea(String)
  3. TextArea(rows,character)
  4. None of these