CSIT 111 QUESTIONS AND ANSWERS GRADED A
CSIT 111 QUESTIONS AND ANSWERS GRADED A A method to find in a class instance data without needing to pass them as parameters or declare them as local variables true Every class definition must include a constructor False While multiple objects of the class can exist in a giver program there can be only one version of each class True Accessors and mutators provide mechanisms for controlled access to a well encapsulated class True All Java classes must contain a main method which is the first method executed when the java class is called upon False As In The other memebers of the C family languages C C++ C# java interprets a zero value as false and a non zero value as true True In java selection statements consist of the if and if else statements False In Java, the symbol "=" and the symbol "==" are used synonymously (interchangeably). False When comparing any primitive type of variable, == should always be used to test to see if two values are equal. False The statement if (a = b) a++; else b--; will do the same thing as the statement if (a b) b--; else a++;. true An if statement may or may not have an else clause, but an else clause must be part of an if statement. true In order to compare int, float and double variables, you can use , , ==, !=, =, =, but to compare char and String variables, you must use compareTo( ), equals( ) and equalsIgnoreCase( ). false Control in a switch statement jumps to the first matching case. false Each case in a switch statement must terminate with a break statement. false It is possible to convert any type of loop (while, do, or for) into any other. true The following loop is syntactically valid. for (int j = 0; j 1000; j++) j--; true A dialog box is a device which accepts voice commands. false For the questions below, assume that boolean done = false, int x = 10, int y = 11, String s = "Help" and String t = "Goodbye". The expression (!done && x = y) is true. true
Written for
- Institution
- CSIT 111
- Course
- CSIT 111
Document information
- Uploaded on
- December 12, 2023
- Number of pages
- 22
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
csit 111 questions and answers graded a
Document also available in package deal