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.
Questions
Which statement is true?
- All the statements are true
- All XML elements must have a closing tag
- All XML elements must be lower case
- All XML documents must have a DTD
XSLT
- Improves Server Performance
- Allows customize data presentations
- Replaces XML
- Used to store xml to databases
What is the correct syntax of the declaration which defines the XML version?:
- <xml version="1.0" />
- <?xml version="1.0"?>
- <?xml version="1.0" />
- None of the above
Move by name performs
- Resets the values
- Copies the values of mathcing column names
- Copies and rests the value specified
- None of the above
Command used to refine the declared variables
- REASSIGN
- REDECLARE
- REDEFINE
- None of the above
Use of Examine command
- Inspect the content of an alphanumeric
- Inspect the content of a binary field
- Range of fields within an array
- Add a pattern
- Delete a pattern
- None of the above
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());
- 15,15
- 12,12
- 12,15
- 15,12
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));
- True
- False
What will be the ouput of the following code snippet? String myString1 = "Hello World!"; myString1.replace('e', 'o'); System.out.println(myString1);
- Hallo World!
- Hello World!
- Compile time error
- NullPointerException
What will be the ouput of the following code snippet? StringBuffer myBuffer = new StringBuffer("Java Programming"); myBuffer.setLength(12); System.out.println(myBuffer);
- Java Programming
- Compile time error
- Throws exception
- Java Program
Among the following what is the advantage of StringBuilder over StringBuffer?
- Faster performance
- Methods are synchronised
- Thread-safety
- Multithreading
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);
- Jovo,Jovo
- Java,Jovo
- Java,Java
- Compile time error
Which of the following is tested when all the test units are run using testdrv -p
- Code Logic
- Code Coverage
- Memory leaks
- All of the above
As per the Coding Guidelines of the Project, Which of the following follows the spacing guidelines while using operators
- anyVal=10;
- anyVal = 10;
- anyVal= 10;
- anyVal =10;
As per the Coding Guidelines of the Project, Which of the following follows guidelines while declaring Pointer
- char* text;
- char *text;
- Char * text;
- char text*;
Which of the following is the only category of Messages where the developer should place information for his debugging purposes
- TRACE (T)
- BUSINESS_INFO (N)
- SERIOUS_WARNING (S)
- BUSINESS_WARNING (G)
As per the Coding Guidelines of the Project, Which of the following is a valid filename ?
- ClassName.cpp
- Classname.cpp
- Class.name.cpp
- Class_Name.cpp
As per the Coding Guidelines of the Project, Which of the following is a valid Class Attribute ?
- mMemberAttribute
- mmemberAttribute
- MemberAttribute
- member_attribute
Which of the following directory in an MDDS instance contains initialisation files which are used during MDDS installation (data files, but installation scripts
- bin
- etc
- data/boc/manual/incoming
- None of the above
Which clearcase command is used to create a new element
- mkelem
- mvelem
- mkview
- ctelem