Model 204 and Java Programming Quiz
Questions covering Model 204 procedure language syntax and Java programming concepts including arrays, methods, inheritance, and flow control
Questions
Class Y is a subclass of Class X.Will this compile? Y myY=new Y(); X myX=myY;
- No
- Compile Error
- Yes
- Runtime Error
- Not Sure
In a Switch construct ,the default statement must be placed after all the case statements.
- True
- False
This is a legal way to create an instance of an inner class: OuterClass.InnerClass x=new OuterClass().InnerClass();
- True
- False
A method with no access modifier can be overridden by a method marked protected.
- True
- False
When an array is constructed,are its elements automatically initialized?
- True
- False
What happens when this is in your code? double x; x=24.0/0;
- Compiler Error
- Compiles and runs
- Runtime Error
- None of these
Abbreviation for FIND AND PRINT COUNT is
- a) FP
- b) FPC
- c) Both (a) & (b)
- d) None of the above
Which one of the following terminates the request and returns you to command level
- STOP
- END
- END NORUN
- CANCEL
A: IN RSREFR FDWOL RECTYPE = REPORT END FIND PLACE RECORDS IN A ON LIST ABC RELEASE RECORDS ON LIST ABC CT: COUNT RECORDS ON LIST ABC PRINT COUNT IN CT What will be the value of count in label CT
- Will be the number of records on LIST ABC
- Will be equal to the number of records in label A
- Zero
- Both (a) & (b) are correct
Suppose “AGE” is the field name and you want to get the value of age between 10 and 20, which of the following statement is correct ?
- AGE IS BETWEEN 10 AND 20
- AGE BETWEEN 10 AND 20
- AGE ONLY BETWEEN 10 AND 20
- AGE BETWEEN 10 ,20
The statement which allows you to add new records to m204 file is:
- Store
- ADD RECORD
- STORE RECORD
- INSERT RECORD
The statement to add new field value to a record is:
- INSERT
- ADD
- STORE
- INSERT INTO
You can use global variables to:
- Pass information from one request to another request
- Include procedures conditionally at the Model 204 command level
- Tailor a request dynamically
- All the above
Functions in the M204 procedure are prefixed with
- %
- $
- ?
- #
Which function strips the leading and trailing blanks of a string?
- $STRIP
- $DECODE
- $DEBLANK
- $EDIT
What will be the result of $EDIT(25.734,'99999.99') statement ?
- 25.73
- 025.73
- 0025.73
- 00025.73
What will be the result of $VNUM(’ -256.73 AB’)statement?
- -256.73
- 256
- 0
- 1
A: IN RSREFR FDWOL RECTYPE = REPORT END FIND PLACE RECORDS IN A ON LIST ABC CT: COUNT RECORDS ON LIST ABC PRINT COUNT IN CT What will be the value of count in label CT
- Will be the number of records on LIST ABC
- Will be equal to the number of records in label A
- Zero
- Both (a) & (b) are correct
Statement which indicates the end of a subroutine is:
- END
- SUBROUTINE END
- END SUBROUTINE
- CLOSE SUBROUTINE
Which statement indicates the beginning of a subroutine
- BEGIN SUBROUTINE
- SUBROUTINE
- SUBROUTINE BEGIN
- START SUBROUTINE