Exam 3: Introduction to Objects and Input/output
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of Java50 Questions
Exam 3: Introduction to Objects and Input/output50 Questions
Exam 4: Control Structures I: Selection50 Questions
Exam 5: Control Structures II: Repetition50 Questions
Exam 6: Graphical User Interface GUI and Object-Oriented Design OOD50 Questions
Exam 7: User-Defined Methods50 Questions
Exam 8: User-Defined Classes50 Questions
Exam 9: Arrays46 Questions
Exam 10: Inheritance and Polymorphism50 Questions
Exam 11: Handling Exceptions and Events50 Questions
Exam 12: Advanced Guis and Graphics48 Questions
Exam 13: Recursion50 Questions
Exam 14: Applications of Arrays Searching and Sorting and Strings50 Questions
Select questions type
Given int num; the value of num is directly stored in its memory space.
(True/False)
4.9/5
(40)
The statement System.exit(0); is found at the end of every working Java program.
(True/False)
4.9/5
(39)
Suppose z = 1834.762. The output of the statementSystem.out.printf("%.1f", z);is 1834.800.
(True/False)
4.9/5
(37)
An expression such as str.length(); is an example of a(n) ____.
(Multiple Choice)
4.9/5
(38)
The classes Integer, Float, and Double are called wrapper classes.
(True/False)
4.9/5
(43)
Which statement instructs a program to run the garbage collector?
(Multiple Choice)
4.9/5
(34)
Which of the following statements would store input in name?
(Multiple Choice)
4.8/5
(40)
String sentence;
String str1, str2, str3, str4;
Int length1;sentence = "First exam is on Monday.";str1 = sentence.substring(6, 12);
Str2 = str1.substring(0, 4);
Str3 = sentence.replace('i', '#');
Str4 = sentence.indexOf("on");length1 = sentence.length();Based on the code above, what is the value of str4?
(Multiple Choice)
4.9/5
(41)
The dot (.) operator is also called the member specific operator.
(True/False)
4.9/5
(33)
In a format specifier, the option width specifies the maximum number of characters to be written to the output.
(True/False)
4.9/5
(33)
If length denotes the length of a nonnull string, then length - 1 gives the index of the last character in the string.
(True/False)
4.8/5
(35)
What is the value of the following statement?
Math.pow(3,4)
(Multiple Choice)
4.9/5
(43)
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)
4.8/5
(36)
What will most probably happen if you omit the dot operator when accessing a method?
(Multiple Choice)
4.8/5
(34)
Suppose that you have the declaration:int num = 94;
Double x = 73.92;
String str = "Programming";What is the output of the following statements?System.out.println("123456789012345678901234567890");
System.out.printf("%5d%6.2f %15s%n", num, x, str);
(Short Answer)
4.8/5
(39)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)