Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Quizzes

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
Quizzes Index

JDK Programming Quiz

Compiled by Calvin Austin

(December 1999)

Have some fun and test your knowledge of JDKTM 1.1 with these questions. Yes, answers are provided along with links to more detailed information about each topic.

Choose one answer for each question. Click Submit to see how you scored, and the correct answers if you missed any, plus links to more detailed information about each topic.


1) Which of the following classes was added to JDKTM 1.1 to help developers scroll components more easily?
A) ScrollPanel
B) Scrollbar
C) ScrollPane

2) In which order are an applets methods called?
A) init, start, stop, destroy
B) constructor, init, start , stop, destroy
C) init, constructor, start, stop, destroy

3) What are javax classes?
A) Java-ActiveX bridge classes
B) Java Standard Extension classes
C) Java X Windows classes
D) Java cross-platform classes

4) Which of these Adapter classes does not exist?
A) ActionAdapter
B) KeyAdapter
C) WindowAdapter
D) FocusAdapter

5) Which of the following statements is true?
A) InputStreams and OutputStreams are 16bit byte streams.
B) BufferedInputStreams can read localized characters.
C) StringReader can read a unicode string.

6) When using the writeObject method to store the state of an object, how can you protect sensitive data from being accessed in the stored object?
A) Implement the Object as Externalizable
B) Declare the sensitive fields as private transient
C) Declare the sensitive fields as static
D) Declare the sensitive fields as protected

7) Which of the following rules must a reusable JavaBeansTM component adhere to?
A) The Bean class must provide zero argument constructors.
B) The Bean must have a corresponding BeanInfo class.
C) The Bean must only use visible components.
D) The Bean must not be serializable.

8) Which of the following statements is NOT true about Swing?
A) You can't mix Swing and AWT code together.
B) Swing is written in 100% Pure Java.
C) You can use Swing components in a JavaBean Builder.
D) You can load a different look and feel dynamically.

9) Which code sample correctly unwraps a byte[2][4] array in a Java native method, where the array, *b24array is passed as a type of HArrayOfArray?
A)
for(int i=0;i<4;i++) {
  for (int j=0;j<2;j++) {
    unhand((HArrayOfByte*)unhand(
      b24array)->body[i])-> body[j];
  }
}
B)
for(int i=0;i<4;i++) {
  for (int j=0;j<2;j++) {
    (HArrayOfByte*)unhand(
      b24array)->body[i]-> body[j];
  }
}
                
C)
for(int i=0;i<2;i++) {
  for (int j=0;j<4;j++) {
    unhand((HArrayOfByte*)unhand(
      b24array)->body[i])-> body[j];
  }
}
D)
for(int i=0;i<2;i++) {
  for (int j=0;j<4;j++) {
    unhand((b24array)->body[j])-> body[i];
  }
} 

10) What can you NOT do with Java ARchive (JAR) files?
A) Digitally sign individual entries
B) Compress entries
C) Include images as well as other resources in the archive
D) Download only the entries you need
When you're done, press


Print Button
[ This page was updated: 27-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.