Question
QUESTION 1 A set method of a class first accesses the values of the data members of the class and then changes the values of
QUESTION 1
A set method of a class first accesses the values of the data members of the class and then changes the values of the data members.
True
False
QUESTION 2
Given String name; the value of name is directly stored in its memory space.
True
False
QUESTION 3
Members of a class consist of packages, methods, and libraries.
True
False
QUESTION 4
String variables are primitive variable types.
True
False
QUESTION 5
The + operator is used to instantiate a class.
True
False
QUESTION 6
If the specified output file does not exist, you will get a FileNotFoundException.
True
False
QUESTION 7
In the class String , the substring method extracts a string from within another string.
True
False
QUESTION 8
A class can have only one constructor.
True
False
QUESTION 9
The DecimalFormat class can be used only to format the output of decimal numbers.
True
False
QUESTION 10
The . (dot) operator is also called the member access operator.
True
False
QUESTION 11
The built-in operation that is valid for classes is the dot operator (.).
True
False
QUESTION 12
A constructor has no type and is therefore a void method.
True
False
QUESTION 13
The word new is an operator.
True
False
QUESTION 14
If the specified output file does not exist, the computer prepares an empty file for output.
True
False
QUESTION 15
Arrays have a fixed number of components.
True
False
QUESTION 16
In row processing, a two-dimensional array is processed one row at a time.
True
False
QUESTION 17
indexOf(char ch) is a method in the class String .
True
False
QUESTION 18
Primitive type variables directly store data into their memory space.
True
False
QUESTION 19
If a member of a class is a method, it can (directly) access any member of the class.
True
False
QUESTION 20
The modifier static in the heading specifies that the method can be invoked by using the name of the class.
True
False
QUESTION 21
The new operator can be used to create a class object.
True
False
QUESTION 22
In column processing, a two-dimensional array is processed one column at a time.
True
False
QUESTION 23
The method length in the class String returns the number of characters in the string not including whitespace characters.
True
False
QUESTION 24
A get method of a class changes the values of the data members of the class.
True
False
QUESTION 25
Every object has access to a reference to itself.
True
False
QUESTION 26
When writing output to a file, if the file is not closed at the end of the program, you may not be able to view your output properly.
True
False
QUESTION 27
Suppose that you have the following declarations. int[] alpha = new int[100]; int[][] beta = new int[25][4]; In this declaration, the array alpha has more components than the array beta.
True
False
QUESTION 28
The following statements creates alpha to be a two-dimeansional array of 25 rows and 10 columns. int[][] alpha = new int[25][10];
True
False
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started