Exam 2: Basic Elements of Java
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
Suppose x = 8. After the execution of the statement y = x++; y is 8 and x is 10.
(True/False)
4.9/5
(35)
Suppose x = 18.6. The output of the statement System.out.println((int)(x) / 3); is 6.
(True/False)
4.9/5
(42)
Suppose that x and y are int variables and x = 7 and y = 8. After the statement: x = x * y - 2; executes, the value of x is ____.
(Multiple Choice)
4.9/5
(37)
Suppose x = 4 and y = 2. If the statement x *= y; is executed once, what is the value of x?
(Multiple Choice)
4.8/5
(40)
Consider the following program. // Insertion Point 1
Public class CircleArea
{
// Insertion Point 2
Static final float PI = 3.14 public static void main(String[]args)
{
//Insertion Point 3 float r = 2.0;
Float area;
Area = PI * r * r;
System.out.println( " Area = " + area);
}
// Insertion Point 4
} In the above code, where do the import statements belong?
(Multiple Choice)
4.9/5
(39)
If a = 4; and b = 3;, then after the statement a = b; executes, the value of b is 4 and the value of a is 3.
(True/False)
4.9/5
(37)
Consider the following program. public class CircleArea
{
Static Scanner console = new Scanner(System.in); static final float PI = 3.14; public static void main(String[]args)
{
Float r;
Float area;
R = console.nextDouble();
Area = PI * r * r;
System.out.println( " Area = " + area);
}
} To successfully compile this program, which of the following import statement is required?
(Multiple Choice)
4.7/5
(35)
____ are executable statements that inform the user what to do.
(Multiple Choice)
4.8/5
(34)
The symbol '5' does not belong to the char data type because 5 is a digit.
(True/False)
4.7/5
(33)
What type of Java statement(s) stores a value in a variable?
(Multiple Choice)
4.9/5
(36)
The ____ rules of a programming language tell you which statements are legal, or accepted by the programming language.
(Multiple Choice)
4.9/5
(34)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)