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

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the maximum number of DD stmt a step can have?

  1. 100
  2. 15
  3. 300
  4. 255
Question 2 Multiple Choice (Single Answer)

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.

  1. step1, step2 and step3 will execute
  2. only step1 and step3 will execute
  3. only step1 and step2 will execute
  4. only step1 will execute
Question 3 Multiple Choice (Single Answer)

If DISP=(,CATLG) which is the correct one?

  1. DISP=NEW,CATLG,CATLG
  2. DISP=OLD,DELETE,CATLG
  3. DISP=NEW,CATLG,DELETE
  4. DISP=OLD,CATLG,CATLG
Question 4 Multiple Choice (Single Answer)

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); } }

  1. 0
  2. 1
  3. 2
  4. 3
Question 5 Multiple Choice (Multiple Answers)

Which of the following are Java modifiers?

  1. public
  2. private
  3. friendly
  4. transient
Question 6 Multiple Choice (Single Answer)

Which one does not have a ValueOf(String) method?

  1. integer
  2. boolean
  3. character
  4. long
Question 7 Multiple Choice (Multiple Answers)

Why might you define a method as native?

  1. to get to access hardware that Java does not know about
  2. to define a new data type such as an unsigned integer
  3. to write optimised code for performance in a language such as C/C++
  4. to overcome the limitation of the private scope of the method
Question 8 Multiple Choice (Single Answer)

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); } }

  1. Compilation and output of the value 0
  2. Compile time error because i has not been initialized
  3. Compilation and output of null
  4. Compile time error
Question 9 Multiple Choice (Multiple Answers)

Which one does not extend java.lang.Number?

  1. integer
  2. boolean
  3. character
  4. short
Question 10 Multiple Choice (Single Answer)

Which of the following will compile correctly

  1. short myshort = 99S;
  2. String name = 'Excellent tutorial Mr Green';
  3. char c = 17c;
  4. int z = 015;
Question 11 Multiple Choice (Multiple Answers)

Which of the following are Java key words

  1. double
  2. Switch
  3. then
  4. instanceof
Question 12 Multiple Choice (Single Answer)

TreeMap class is used to implement which collection interface. Select the one correct answer

  1. SortedMap
  2. Tree
  3. Set
  4. SortedSet
Question 13 Multiple Choice (Single Answer)

Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?

  1. System.free()
  2. System.setGarbageCollection()
  3. System.setGarbageCollector()
  4. System.gc()
Question 14 True/False

True or False: You don’t need to specify a default value for an optional parameter

  1. True
  2. False
Question 15 Multiple Choice (Single Answer)

How many fields are maintained by the runtime by each instance of a reference type?

  1. One Field
  2. Two Fields
  3. Three Fields
  4. Four fields
Question 16 Multiple Choice (Single Answer)

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

  1. Shadowing
  2. Late Binding
  3. .NET Reflection
  4. All of the above
Question 17 Multiple Choice (Single Answer)

Which of the following namespace provides classes that can be used to create and manipulate custom performance counters?

  1. System.NET.DNS
  2. System.Data.Common
  3. System.Diagnostics namespace
  4. none of the above
Question 18 Multiple Choice (Single Answer)

Which of the following happens when the FormBorderStyle property is set to None in VB.NET?

  1. borderless form is made
  2. The form cannot be moved
  3. Both A and B
  4. None of the Above
Question 19 Multiple Choice (Single Answer)

What is the significance of the option explicit statement when it is set to ON

  1. Specifies that any variable name is declared (with type) before use
  2. Specifies whether String should be compared as binary
  3. Specifies that variables should be intialized before use
  4. All of the above
Question 20 Multiple Choice (Single Answer)

Which of the following is used to check whether the Caps lock in keyboard is turned on or Not By using VB.Net 2005?

  1. If My.Computer.Keyboard.CapsLock = True Then
  2. If System.Computer.Keyboard.CapsLock = True Then
  3. Both A and B
  4. None of the Above