CSIT 111 Exam Questions and Answers 2024;full solution pack
A method to find in a class instance data without needing to pass them as parameters or declare them as local variables - Answer-true Every class definition must include a constructor - Answer-False While multiple objects of the class can exist in a giver program there can be only one version of each class - Answer-True Accessors and mutators provide mechanisms for controlled access to a well encapsulated class - AnswerTrue All Java classes must contain a main method which is the first method executed when the java class is called upon - Answer-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 - Answer-True In java selection statements consist of the if and if else statements - Answer-False In Java, the symbol "=" and the symbol "==" are used synonymously (interchangeably). - Answer-False When comparing any primitive type of variable, == should always be used to test to see if two values are equal. - Answer-False The statement if (a >= b) a++; else b--; will do the same thing as the statement if (a < b) b--; else a++;. - Answer-true An if statement may or may not have an else clause, but an else clause must be part of an if statement. - Answer-trueIn 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( ). - Answer-false Control in a switch statement jumps to the first matching case. - Answer-false Each case in a switch statement must terminate with a break statement. - Answer-false It is possible to convert any type of loop (while, do, or for) into any other. - Answer-true The following loop is syntactically valid. for (int j = 0; j < 1000; j++) j--; - Answer-true A dialog box is a device which accepts voice commands. - Answer-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. - Answer-true 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 | | reTo(t) < 0) is true. - Answer-false How many unique items can be represented with 16 bits? - Answer-256 items If a language uses 240 unique letters and symbols, how many bits would beneeded to store each character of a document? - Answer-1
Written for
- Institution
- CSIT 111
- Course
- CSIT 111
Document information
- Uploaded on
- May 23, 2024
- Number of pages
- 13
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal