0

web technology Online Quiz - 8

Description: web technology Online Quiz - 8
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

Which of the following container is sub class of Panel Container

  1. ViewStack

  2. TitleWindow

  3. Accordion

  4. Application


Correct Option: B

Which of the following is the default value of creationPolicy property of any application?

  1. QUEUED

  2. AUTO

  3. ALL

  4. NONE


Correct Option: B

Which of the following component can be used to present a dialog box style window?

  1. TitleWindow

  2. ControlBar

  3. PopUpBBar

  4. ButtonBar


Correct Option: A

The method in Array which is used to sort the Objects in Array on specific property in the Object is

  1. sort

  2. sortOn

  3. reverse

  4. sortBy


Correct Option: B

Which of the following is correct code to define a contructor in ActionScript class?

  1. private constructor classname()

  2. public constructor classname()

  3. private function classname()

  4. public function classname()


Correct Option: D

Which of the following component is used to encapsulate data and behaviours related to the data processed by the appliation

  1. Controller

  2. View

  3. Pattern

  4. Model


Correct Option: D

What is NOT possible with mx:DataGrid ?

  1. Sortable Columns

  2. Rearrange columns at runtime

  3. Represent hierarchical data

  4. Customize a cell in datagrid


Correct Option: C

You have a requirement to create a itemrenderer which need to be used in more than one column in a datagrid. Which type of ItemRender will be good practice?

  1. DropIn ItemRenderer

  2. Inline ItemRenderer

  3. Custom Component ItemRender

  4. No way to do that in Flex.


Correct Option: C

AI Explanation

To answer this question, you need to understand the different types of item renderers available in Flex and their use cases.

Option A) DropIn ItemRenderer - This option is incorrect because a DropIn item renderer is designed to be used in a single column of a DataGrid. It cannot be used in multiple columns.

Option B) Inline ItemRenderer - This option is incorrect because an Inline item renderer is also designed to be used in a single column of a DataGrid. It cannot be used in multiple columns.

Option C) Custom Component ItemRenderer - This option is correct because a Custom Component item renderer can be created and used in multiple columns of a DataGrid. By creating a custom component item renderer, you can define the desired behavior and appearance and reuse it across multiple columns.

Option D) No way to do that in Flex - This option is incorrect because Flex provides the capability to create custom component item renderers that can be used in multiple columns of a DataGrid.

The correct answer is C) Custom Component ItemRenderer. This option is correct because it allows for the creation of a reusable item renderer that can be used in multiple columns of a DataGrid.

How do you get access to the object corresponding to the datagrid row inside an itemRenderer?

  1. Access via parent

  2. Have a variable outside of the datagrid to hod the data

  3. Using implicit object called “data”

  4. Using implicit object called “object”


Correct Option: C
  1. Use the property called “data” in event Object

  2. Use the property called “payload” in event Object

  3. Create a Custom Event and have your own public variable to hold the data to be passed to the handler

  4. No way to do that.


Correct Option: C

You need to reposition the children of a container when loadin the application based on some custom logic. Which is the correct place to trigger the logic?

  1. preinitialize of the Container

  2. initialize of the container

  3. creationComplete of the child Components of the container

  4. creationComplete of the Container


Correct Option: D

//INDD DD DSN=XXXX.XXXX.INPUT,DISP=SHR,UNIT=SYSDA //OUTDD DD DSN=XXXX.XXXX.OUTPUT,DISP=(NEW,CATLG), //INDD DD DSN=XXXX.XXXX.INPUT,DISP=SHR,UNIT=SYSDA //OUTDD DD DSN=XXXX.XXXX.OUTPUT,DISP=(NEW,CATLG), // _________________ To use the same unit, that has been used by a prior DD Statement,

  1. UNIT=INDD

  2. UNIT=*=INDD

  3. UNIT=AFF=INDD

  4. UNIT=AFF*INDD


Correct Option: C
Explanation:

To solve this question, the user needs to know the syntax of DD statements and the purpose of the UNIT parameter.

The correct option to use the same unit that has been used by a prior DD statement is option C.

Explanation of each option:

A. UNIT=INDD: This option specifies a specific device name, INDD, to be used for the DD statement. However, it does not ensure that the same device used in the prior DD statement is used.

B. UNIT==INDD: This option specifies that the same device name used in the previous DD statement should be used, indicated by the asterisk (), but it is not a valid syntax.

C. UNIT=AFF=INDD: This option specifies that the device name specified in a previous DD statement with the same DDNAME should be used for this DD statement. The AFF parameter indicates that the same device affinity should be used, ensuring that the same physical device is used. This is the correct option to use the same unit that has been used by a prior DD statement.

D. UNIT=AFF*INDD: This option is not a valid syntax. The AFF parameter requires a specific DDNAME to be specified, not an asterisk.

Therefore, the answer is: C. UNIT=AFF=INDD

It is possible to modify a constant variable which is intitialized

  1. True

  2. False


Correct Option: A

public class Name { private String first, last; public Name(String first, String last) { this.first = first; this.last = last; } public boolean equals(Object o) { if (!(o instanceof Name)) return false; Name n = (Name)o; return n.first.equals(first) && n.last.equals(last); } public static void main(String[] args) { Set s = new HashSet(); s.add(new Name("Donald", "Duck")); System.out.println(s.contains(new Name("Donald", "Duck"))); } } What is the output?

  1. true

  2. false

  3. Compile Error

  4. None of the above


Correct Option: B

AI Explanation

To answer this question, let's go through the code step by step:

In the main method:

  1. Set s = new HashSet(); - This creates a new HashSet object called s.
  2. s.add(new Name("Donald", "Duck")); - This adds a new Name object with the first name "Donald" and last name "Duck" to the HashSet.
  3. System.out.println(s.contains(new Name("Donald", "Duck"))); - This checks if a new Name object with the first name "Donald" and last name "Duck" is present in the HashSet using the contains method.

In the equals method:

  1. if (!(o instanceof Name)) return false; - This checks if the passed object o is an instance of the Name class. If it is not, it returns false.
  2. Name n = (Name)o; - This creates a new Name object n by casting the passed object o to the Name class.
  3. return n.first.equals(first) && n.last.equals(last); - This checks if the first and last names of the passed Name object n are equal to the first and last names of the current Name object. If they are equal, it returns true, otherwise it returns false.

Based on the code, the output will be:

B. false

Explanation: The HashSet uses the equals method to check for object equality. In the equals method of the Name class, the comparison is based on the equality of the first and last names. Since the equals method is not overridden in the Name class, it uses the default implementation from the Object class, which checks for reference equality. Therefore, when calling s.contains(new Name("Donald", "Duck")), the HashSet will create a new Name object, and since it is a different object from the one added to the HashSet earlier, the contains method will return false.

The jewel of Java Ring is

  1. Diamond

  2. Java Virtual Machine

  3. Java iButton

  4. None of these


Correct Option: B,C
  1. Asyncronous Java eXtensible Language

  2. Asyncronous Java XML

  3. Asyncronous JavaScript XML

  4. Asyncronous J2EE XML


Correct Option: C

In which case would you use a FULL OUTER JOIN ?

  1. You want all unmatched data from both table

  2. You want all matched data from both table

  3. You want all matched and unmatched data from both table

  4. You want all unmatched data from one table


Correct Option: A

AI Explanation

To answer this question, we need to understand the different types of joins in SQL.

A FULL OUTER JOIN returns all rows from both tables, including unmatched rows from both tables. It combines the results of a LEFT OUTER JOIN and a RIGHT OUTER JOIN.

Let's go through each option to understand why it is correct or incorrect:

Option A) You want all unmatched data from both tables - This option is correct because a FULL OUTER JOIN includes all unmatched data from both tables.

Option B) You want all matched data from both tables - This option is incorrect because a FULL OUTER JOIN includes both matched and unmatched data from both tables.

Option C) You want all matched and unmatched data from both tables - This option is incorrect because a FULL OUTER JOIN includes both matched and unmatched data, not just matched data.

Option D) You want all unmatched data from one table - This option is incorrect because a FULL OUTER JOIN includes unmatched data from both tables, not just one table.

The correct answer is Option A. A FULL OUTER JOIN is used when you want all unmatched data from both tables.

- Hide questions