Syvum Home Page

Home > Quiz Games > Java Programming > Print Preview

Java Programming : Standard API : True or False

Formats Info Page Worksheet / Test Paper Quiz Review
Table

Try the Quiz : Java Programming : Standard API : True or False

About Button apid Just what you need to know!
eview

QuestionAnswerExplanation
A value must always be assigned to String object when it is created, and cannot be modified later.
• True
• False
FalseThe text in Strings objects can be changed unless they are declared as final.
The expression str.length returns the length (number of characters) contained in str, a String object.
• True
• False
FalseThe method str.length() must be invoked to obtain the length of a string. Food for thought: if str was an array of String objects instead of a String object, what would str.length return?
The System.in and System.out objects are created by default and need not be created explicitly.
• True
• False
TrueSystem.in and System.out are static objects in the class System that allow reading and writing from and to the console.
An instance of the java.io.File class can be used to delete a file.
• True
• False
TrueThe class java.io.File supports the method delete which can be used to delete a file or a directory.
An instance of class java.awt.Panel cannot be added to another instance of the same class.
• True
• False
FalsePanels are useful to create layouts of a graphic object, and can be placed inside other panels.
The CheckboxGroup class in package java.awt is a subclass of the Component class in the same package.
• True
• False
FalseAn instance of CheckboxGroup may be used to group together instances of Checkbox class. It is by itself not a Component.
If an instance of the GridLayout class in java.awt package is used as a layout manager for a java.awt.Frame object, then all the components added directly to the Frame object are of the same width and height.
• True
• False
TrueGridLayout simply divides the available space into rectangles of equal dimensions.
The BorderLayout class in java.awt is intended mainly to allow decorative borders to be laid out around graphic components.
• True
• False
FalseThe BorderLayout class can be used to lay out components in a graphic object in 5 different locations NORTH, SOUTH, EAST, WEST and CENTER.
As a part of the standard API, Java provides a class called Directory in the package java.io which enables the listing of the contents of a directory.
• True
• False
FalseThe class java.io.File provides functionality to list contents of a directory using the list method.
Java makes it easy to read floats and doubles by providing methods to accomplish this in its FileReader class in the package java.io.
• True
• False
FalseThe FileReader class provides a convenient way of reading character files in the default character encoding.

Try the Quiz : Java Programming : Standard API : True or False


Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright
Previous
-
Next
-