Java, COBOL & Programming Concepts Quiz

Test knowledge of Java programming, COBOL operations, XML syntax, and general programming guidelines including coding standards, debugging, and string manipulation.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which statement is true?

  1. All the statements are true
  2. All XML elements must have a closing tag
  3. All XML elements must be lower case
  4. All XML documents must have a DTD
Question 2 Multiple Choice (Single Answer)

XSLT

  1. Improves Server Performance
  2. Allows customize data presentations
  3. Replaces XML
  4. Used to store xml to databases
Question 3 Multiple Choice (Single Answer)

What is the correct syntax of the declaration which defines the XML version?:

  1. <xml version="1.0" />
  2. <?xml version="1.0"?>
  3. <?xml version="1.0" />
  4. None of the above
Question 4 Multiple Choice (Single Answer)

Move by name performs

  1. Resets the values
  2. Copies the values of mathcing column names
  3. Copies and rests the value specified
  4. None of the above
Question 5 Multiple Choice (Single Answer)

Command used to refine the declared variables

  1. REASSIGN
  2. REDECLARE
  3. REDEFINE
  4. None of the above
Question 6 Multiple Choice (Multiple Answers)

Use of Examine command

  1. Inspect the content of an alphanumeric
  2. Inspect the content of a binary field
  3. Range of fields within an array
  4. Add a pattern
  5. Delete a pattern
  6. None of the above
Question 7 Multiple Choice (Single Answer)

What will be the ouput of the following code snippet? StringBuffer myBuffer = new StringBuffer(15); myBuffer.append("Hello World!"); System.out.println(myBuffer.length()+","+ myBuffer.capacity());

  1. 15,15
  2. 12,12
  3. 12,15
  4. 15,12
Question 8 True/False

What will be the ouput of the following code snippet? String myString1 = "Java"; String myString2 = new String("Java"); System.out.println(myString1 == myString2 ^ myString1.equals(myString2));

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

What will be the ouput of the following code snippet? String myString1 = "Hello World!"; myString1.replace('e', 'o'); System.out.println(myString1);

  1. Hallo World!
  2. Hello World!
  3. Compile time error
  4. NullPointerException
Question 10 Multiple Choice (Single Answer)

What will be the ouput of the following code snippet? StringBuffer myBuffer = new StringBuffer("Java Programming"); myBuffer.setLength(12); System.out.println(myBuffer);

  1. Java Programming
  2. Compile time error
  3. Throws exception
  4. Java Program
Question 11 Multiple Choice (Single Answer)

Among the following what is the advantage of StringBuilder over StringBuffer?

  1. Faster performance
  2. Methods are synchronised
  3. Thread-safety
  4. Multithreading
Question 12 Multiple Choice (Single Answer)

What will be the ouput of the following code snippet? String myString = new String("Java"); StringBuffer myBuffer = new StringBuffer("Java"); myString.replace('a','o'); myBuffer.replace('a','o'); System.out.println(myString+","+myBuffer);

  1. Jovo,Jovo
  2. Java,Jovo
  3. Java,Java
  4. Compile time error
Question 13 Multiple Choice (Single Answer)

Which of the following is tested when all the test units are run using testdrv -p

  1. Code Logic
  2. Code Coverage
  3. Memory leaks
  4. All of the above
Question 14 Multiple Choice (Single Answer)

As per the Coding Guidelines of the Project, Which of the following follows the spacing guidelines while using operators

  1. anyVal=10;
  2. anyVal = 10;
  3. anyVal= 10;
  4. anyVal =10;
Question 15 Multiple Choice (Single Answer)

As per the Coding Guidelines of the Project, Which of the following follows guidelines while declaring Pointer

  1. char* text;
  2. char *text;
  3. Char * text;
  4. char text*;
Question 16 Multiple Choice (Single Answer)

Which of the following is the only category of Messages where the developer should place information for his debugging purposes

  1. TRACE (T)
  2. BUSINESS_INFO (N)
  3. SERIOUS_WARNING (S)
  4. BUSINESS_WARNING (G)
Question 17 Multiple Choice (Single Answer)

As per the Coding Guidelines of the Project, Which of the following is a valid filename ?

  1. ClassName.cpp
  2. Classname.cpp
  3. Class.name.cpp
  4. Class_Name.cpp
Question 18 Multiple Choice (Single Answer)

As per the Coding Guidelines of the Project, Which of the following is a valid Class Attribute ?

  1. mMemberAttribute
  2. mmemberAttribute
  3. MemberAttribute
  4. member_attribute
Question 19 Multiple Choice (Single Answer)

Which of the following directory in an MDDS instance contains initialisation files which are used during MDDS installation (data files, but installation scripts

  1. bin
  2. etc
  3. data/boc/manual/incoming
  4. None of the above
Question 20 Multiple Choice (Single Answer)

Which clearcase command is used to create a new element

  1. mkelem
  2. mvelem
  3. mkview
  4. ctelem