VB.NET, Java, and Mainframe Programming Quiz
A mixed quiz covering programming concepts in VB.NET, Java, and IBM Mainframe JCL including syntax, language features, and job control statements
Questions
What is the maximum number of DD stmt a step can have?
- 100
- 15
- 300
- 255
STEP1 EXEC PGM=P1 STEP2 EXEC PGM=P2,COND=EVEN STEP3 EXEC PGM=P3,COND=((8,LE,STEP1),ONLY) If the condition code of the step1 is 4 and the step2 was abended then which statement is correct.
- step1, step2 and step3 will execute
- only step1 and step3 will execute
- only step1 and step2 will execute
- only step1 will execute
If DISP=(,CATLG) which is the correct one?
- DISP=NEW,CATLG,CATLG
- DISP=OLD,DELETE,CATLG
- DISP=NEW,CATLG,DELETE
- DISP=OLD,CATLG,CATLG
What gets printed when the following program is compiled and run. Select the one correct answer. class test { public static void main(String args[]) { int i,j,k,l=0; k = l++; j = ++k; i = j++; System.out.println(i); } }
- 0
- 1
- 2
- 3
Which of the following are Java modifiers?
- public
- private
- friendly
- transient
Which one does not have a ValueOf(String) method?
- integer
- boolean
- character
- long
Why might you define a method as native?
- to get to access hardware that Java does not know about
- to define a new data type such as an unsigned integer
- to write optimised code for performance in a language such as C/C++
- to overcome the limitation of the private scope of the method
Which option most fully describes will happen when you attempt to compile and run the following code public class MyAr{ public static void main(String argv[]) { MyAr m = new MyAr(); m.amethod(); } public void amethod(){ static int i; System.out.println(i); } }
- Compilation and output of the value 0
- Compile time error because i has not been initialized
- Compilation and output of null
- Compile time error
Which one does not extend java.lang.Number?
- integer
- boolean
- character
- short
Which of the following will compile correctly
- short myshort = 99S;
- String name = 'Excellent tutorial Mr Green';
- char c = 17c;
- int z = 015;
Which of the following are Java key words
- double
- Switch
- then
- instanceof
TreeMap class is used to implement which collection interface. Select the one correct answer
- SortedMap
- Tree
- Set
- SortedSet
Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?
- System.free()
- System.setGarbageCollection()
- System.setGarbageCollector()
- System.gc()
True or False: You don’t need to specify a default value for an optional parameter
- True
- False
How many fields are maintained by the runtime by each instance of a reference type?
- One Field
- Two Fields
- Three Fields
- Four fields
The concept in VB.NET by which one can provide a new implementation for the base class member without overriding the member is called as
- Shadowing
- Late Binding
- .NET Reflection
- All of the above
Which of the following namespace provides classes that can be used to create and manipulate custom performance counters?
- System.NET.DNS
- System.Data.Common
- System.Diagnostics namespace
- none of the above
Which of the following happens when the FormBorderStyle property is set to None in VB.NET?
- borderless form is made
- The form cannot be moved
- Both A and B
- None of the Above
What is the significance of the option explicit statement when it is set to ON
- Specifies that any variable name is declared (with type) before use
- Specifies whether String should be compared as binary
- Specifies that variables should be intialized before use
- All of the above
Which of the following is used to check whether the Caps lock in keyboard is turned on or Not By using VB.Net 2005?
- If My.Computer.Keyboard.CapsLock = True Then
- If System.Computer.Keyboard.CapsLock = True Then
- Both A and B
- None of the Above