Showing posts with label Action-Script. Show all posts
Showing posts with label Action-Script. Show all posts

UpWork (oDesk) & Elance Spring MVC Test Question & Answers

17:47 Add Comment
UpWork (oDesk) & Elance Spring MVC Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Spring MVC. Lets Start test.


Ques : In an annotation-based Spring MVC controller, which of the following are valid ways to set cache headers for a specific path?
Ans  :  Ensuring the instance of "AnnotationMethodHandlerAdapter" does not have the    "cacheSeconds" property set, and adding an instance of "WebContentInterceptor".
       Adding "final HttpServletResponse response" as a parameter, then setting the header "Cache-Control" to "all-cache".
       Using a Handler Interceptor and using the "postHandle" method provided by it.

Ques : Which of the following are valid sets of constructor arguments for the ModelAndView class? (Select all correct answers.)
Ans  :  String viewName
        String viewName, Map model

Ques :  Which of the following are possible validation methods for user input in Spring MVC?
Ans  :  Annotation validation
        Programmatic validation

Ques : Which of the following code samples will get the ServletContext inside an Interceptor?
Ans  : @Autowired ServletContext context;
       request.getSession().getServletContext();

Ques : Which of the following dependency injection (DI) methodologies are available in Spring MVC?
Ans  : Constructor-based dependency injection
       Setter-based dependency injection

Ques : Which of the following interfaces can be implemented to interact with a container's management of the bean lifecycle?
Ans  : InitializingBean
       DisposableBean

Ques : Select all authentication methods that are supported by Spring Security by default:
Ans  : Basic Authentication
       Digest Access Authentication

Ques : True or false: a factory class can hold more than one factory method.
Ans  : True

Ques : Regarding the @Resource annotation, which of the following statements is false?
Ans  :  If no name attribute is specified, the default name is derived from the field name or setter method.

Ques : Which of the following  statements is true about method arguments that have an @ModelAttribute annotation?
Ans  :  Model attributes have to be explicitly added when using @ModelAttribute.

Ques : What does the following code do?

@RequestMapping("/{id}/**")
public void foo(@PathVariable("id") int id, HttpServletRequest request) {
    String restOfTheUrl = (String) request.getAttribute(
        HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
    ...
}
Ans  :  It retrieves the partial path value (after "**") before the @RequestMapping and @PathVariable values have been parsed.

Ques : Which of the following can be used to serve static resources while still using DispatchServlet at the site's root?
Ans  :

Ques : What is the difference between the @Repository and the @Controller annotations in Spring?
Ans  : "@Repository" is used as a stereotype for the persistence layer, while "@Controller" is used as a stereotype for the presentation layer.

Ques : Which of the following annotations are supported by classes with the @Bean annotation?
Ans  :  @PostConstruct

Ques : Which of the following statements is false?
Ans  : By default, a transaction is only marked for rollback in the case of runtime unchecked exceptions.

Ques :  Which of the following statements is true about the HandlerExceptionResolver class?
Ans  : DefaultHandlerExceptionResolver converts standard Spring exceptions and converts them to HTTP Status Codes.

Ques : Given the following method:

@RequestMapping(method=RequestMethod.GET, value="/fooBar")
    public ResponseEntity fooBar2() {
      String json = "jsonResponse";
      HttpHeaders responseHeaders = new HttpHeaders();
      responseHeaders.setContentType(MediaType.APPLICATION_JSON);
      return new ResponseEntity(json, responseHeaders, HttpStatus.CREATED);
    }

Which of the following statements is correct?
Ans  : It returns a JSON String and sets the mimetype to text/javascript.

Ques : Which of the following classes provides built-in pagination functionality in SpringMVC?
Ans  : PagedListHolder

Ques : Given the method below:

@RequestMapping(value = "/foo", method = RequestMethod.GET)
public final String foo(HttpServletRequest request, BindingResult bindResult, ModelMap model) {
    model.addAttribute("abc", 123);
    return "foo";
}

When the view is displayed in the browser, it's URL is "http://mydomain/foo?abc=123".

Which of the following statements is true?
Ans  : The attribute name-value pair will be included in the URL, regardless of the use of @ModelAttribute in the controller.

Ques : Which of the following is true about the use of in a servlet?
Ans  :   activates many different annotations in beans, whether they are defined in XML or through component scanning.

Ques : Fill in the blank:
The _______ enables the use of the bean element’s attributes, instead of nested elements, to describe property values and/or collaborating beans.
Ans  : p-namespace

Ques : Which of the following statements is true about the @RequestMapping annotation?
Ans  : It supports ant-style paths.

Ques : Which of the following statements is true for the configuration of the Spring handler adapter(s) in a Spring MVC application context?
Ans  : If at least one request handler adapter is defined the context files, Spring will not create the default adapters.

Ques : Which of the following statements is true about the HandlerInterceptor interface?
Ans  : It allows exchanging the request and response objects that are handed down the execution chain.

Ques : How can an HTTP 404 status code be returned from a Spring MVC Controller?
Ans  : Having the method accept HttpServletResponse as a parameter, so that setStatus(404) can be called on it.

Ques : Which of the following is the default bean scope in Spring MVC?
Ans  : singleton

Ques : Which of the following enables custom qualifier annotation types to be registered even if they are not annotated with Spring’s @Qualifier annotation?
Ans  : CustomAutowireConfigurer

Ques : Which of the following statements is correct?
Ans  : doesn't declare its own handler mapping

Ques : Which of the following statements is true about the @RequestParam annotation?
Ans  : It indicates that a method parameter should be bound to a web request parameter.

Ques : Which of the following code samples will correctly return an image in @ResponseBody from a byte[] of image data?
Ans  : @ResponseBody @RequestMapping("/photo", method = RequestMethod.GET, produces = MediaType.IMAGE_JPEG_VALUE) public byte[] testphoto() throws IOException { InputStream in = servletContext.getResourceAsStream("/images/no_image.jpg"); return IOUtils.toByteArray(in); }

Ques : Which of the following statements are correct, with respect to using the @PreAuthorize annotation in Spring controller methods?
Ans  : @PreAuthorize works with Spring controller methods.

Ques : Which of the following is not a built-in Spring MVC bean scope?
Ans  : local session

Ques : Fill in the blank: _______ is a class-level annotation indicating that an object is a source of bean definitions.
Ans  : @Configuration

Ques : Fill in the blank:
When defining a bean that is created with a static factory method, the ______ attribute is used to specify the class containing the static factory method.
Ans  : class

Ques : Which of the following statements is true about the @ModelAttribute annotation?
Ans  : It can be used to expose reference data to a web view.

Ques : Fill in the blank:
In Spring's XML-based configuration, the _______ attribute of the element specifies a property or constructor argument as a string representation.
Ans  : name

Ques : Which of the following statements is/are true about autowiring in Spring?
Ans  : Fields are injected after the construction of a bean.

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD UpWorkElanceTests ARSBD-JOBS DesignerTab UpLance

UpWork (oDesk) & Elance Oracle PL Test Question & Answers

15:28 Add Comment
UpWork (oDesk) & Elance Oracle PL Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Oracle PL. Lets Start test.


Ques : The oracle server implicitly opens a cursor to process:
Ans  :  A Sql select statement
       DML Statements

Ques : Which two among the following programming constructs can be grouped within a package?
Ans  : Constant
       Sequence

Ques : Which two statements, among the following, describe the state of a package variable after executing the package in which it is declared?
Ans  : It persists across transactions within a session
       It persists from session to session for the same user

Ques : Which of the following is not a legal declaration?
Ans  : declare x,y varchar2(10);
      declare Sex boolean:=1;
 
Ques : Which two statements out of the following regarding packages are true?
Ans  : The package specification is required, but the package body is optional
       The specification and body of the package are stored separately in the database
 
Ques : A table has to be dropped from within a stored procedure. How can this be implemented
Ans  : Use the DBMS_DDL packaged routines in the procedure to drop the table

Ques : CREATE OR REPLACE PACKAGE manage_emp IS
tax_rate CONSTANT NUMBER(5,2) := .28;
v_id NUMBER;
PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER);
PROCEDURE delete_emp;
PROCEDURE update_emp;
FUNCTION cal_tax (p_sal NUMBER) RETURN NUMBER;
END manage_emp;
/
CREATE OR REPLACE PACKAGE BODY manage_emp IS

PROCEDURE update_sal (p_raise_amt NUMBER) IS
BEGIN
UPDATE emp SET sal = (sal * p_raise_emt) + sal
WHERE empno = v_id;
END;

PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER) IS
BEGIN
INSERT INTO emp(empno, deptno, sal) VALUES
(v_id, p_depntno, p_sal);
END insert_emp;

PROCEDURE delete_emp IS
BEGIN
DELETE FROM emp WHERE empno = v_id;
END delete_emp;

PROCEDURE update_emp IS
v_sal NUMBER(10,2);
v_raise NUMBER(10, 2);
BEGIN
SELECT sal INTO v_sal FROM emp WHERE empno = v_id;
IF v_sal < 500 THEN v_raise := .05;
ELSIP v_sal < 1000 THEN v_raise := .07;
ELSE v_raise := .04;
END IF;
update_sal(v_raise);
END update_emp;

FUNCTION cal_tax (p_sal NUMBER)RETURN NUMBER IS
BEGIN
RETURN p_sal * tax_rate;
END cal_tax;
END manage_emp;
/
What is the name of the private procedure in this package?
Ans  : UPDATE_SAL

Ques : An internal LOB is _____.
Ans  : Stored in the database

Ques : The technique employed by the Oracle engine to protect table data, when several people are accessing it is called:
Ans  :  Concurrency Control

Ques : Which table should be queried to determine when the procedure was last compiled?
Ans  : USER_OBJECTS

Ques : Which cursor dynamically allows passing values to a cursor while opening another cursor?
Ans  : Implicit Cursor

Ques : Which precomplied word is called, which when encountered, immediately binds the numbered exception handler to a name?
Ans  : Exception_init

Ques : How can migration be done from a LONG to a LOB data type for a column?
Ans  : Using ALTER TABLE statement

Ques : Which table and column can be queried to see all procedures and functions that have been marked invalid?
Ans  : USER_OBJECTS table,STATUS column

Ques : In which type of trigger can the OLD and NEW qualifiers can be used?
Ans  : Row level DML trigger

Ques : Examine the following trigger:

CREATE OR REPLACE TRIGGER Emp_count
AFTER DELETE ON Employee
FOR EACH ROW
DECLARE
n INTEGER;
BEGIN
SELECT COUNT(*) INTO n FROM employee;
DMBS_OUTPUT.PUT_LINE( 'There are now' || n || 'employees');
END;

This trigger results in an error after this SQL statement is entered: DELETE FROM Employee WHERE Empno = 7499;
How should the error be corrected?
Ans  : Take out the COUNT function because it is not allowed in a trigger

Ques : Which Section deals with handling of errors that arise during execution of the data manipulation statements, which makeup the PL/SQL Block?
Ans  : Exception

Ques :  Which of the following statements is true?
Ans  :  Stored functions can increase the efficiency of queries by performing functions in the query rather than in the application

Ques :Examine the following code:
CREATE OR REPLACE FUNCTION gen_email (first_name VARCHAR2, last_name VARCHAR2,
id NUMBER)
RETURN VARCHAR2 IS
email_name VARCHAR2(19);
BEGIN
email_name := SUBSTR(first_name, 1, 1) ||
SUBSTR(last_name, 1, 7) ||.@Oracle.com .;
UPDATE employees SET email = email_name
WHERE employee_id = id;
RETURN email_name;
END;
Which of the following statements removes the function?
Ans  : DROP FUNCTION gen_email;

Ques : In Pl/Sql, if the where clause evaluates to a set of data, which lock is used?
Ans  :  Page Level lock

Ques : If user defined error condition exists,Which of the following statements made a call to that exception?
Ans  : Raise

Ques : Which of the following are identified by the "INSTEAD OF" clause in a trigger?
Ans  : The view associated with the trigger

Ques : What type of trigger is created on the EMP table that monitors every row that is changed, and places this information into the AUDIT_TABLE?
Ans  : FOR EACH ROW trigger on the EMP table

Ques : Which procedure is called after a row has been fetched to transfer the value, from the select list of the cursor into a local variable?
Ans  :  Row_value

Ques : What is the maximum number of handlers processed before the PL/SQL block is exited, when an exception occurs?
Ans  : Only one

Ques : When the procedure or function is invoked, the Oracle engine loads the compiled procedure or function in the memory area called:
Ans  : PGA

Ques : What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations?
Ans  : The area of memory established to process the SQL statement is released

Ques : Examine the following package specification:
CREATE OR REPLACE PACKAGE combine_all
IS
v_string VARCHAR2(100);
PROCEDURE combine (p_num_val NUMBER);
PROCEDURE combine (p_date_val DATE);
PROCEDURE combine (p_char_val VARCHAR2, p_num_val NUMBER);
END combine_all;
/
Which overloaded COMBINE procedure declaration can be added to this package specification?
Ans  :  PROCEDURE combine;

Ques : Which part of a database trigger determines the number of times the trigger body executes?
Ans  : Trigger type

Ques : Which table should be queried to check the status of a function?
Ans  : USER_OBJECTS

Ques : Which of the following statements is true regarding stored procedures?
Ans  :  A stored procedure must have at least one executable statement in the procedure body

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER secure_emp
BEFORE LOGON ON employees
BEGIN
IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR
(TO_CHAR(SYSDATE, 'HH24:MI')
NOT BETWEEN '08:00' AND '18:00')
THEN RAISE_APPLICATION_ERROR (-20500, 'You may
insert into the EMPLOYEES table only during
business hours.');
END IF;
END;
/
What type of trigger is it?
Ans  : This is an invalid trigger

Ques : Which code is stored in the database when a procedure or function is created in SQL*PLUS?
Ans  : Only P-CODE

Ques : Evaluate the following PL/SQL block:
DECLARE
v_low   NUMBER:=2;
v_upp   NUMBER:=100;
v_count NUMBER:=1;
BEGIN
FOR i IN v_low..v_low LOOP
INSERT INTO test(results)
VALUES (v_count)
v_count:=v_count+1;
END LOOP;
END;
How many times will the executable statements inside the FOR LOOP execute?
Ans  : 1

Ques : What can be done with the DBMS_LOB package?
Ans  : Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER UPD_SALARY
FOR EACH ROW
BEGIN
UPDATE TEAM
SET SALARY=SALARY+:NEW.SALARY
WHERE ID=:NEW.TEAM_ID
END;
Which statement must be added to make this trigger executable after updating the SALARY column of the PLAYER table?
Ans  : AFTER UPDATE ON PLAYER

Ques : Examine the following code:

CREATE OR REPLACE PACKAGE comm_package IS
g_comm NUMBER := 10;
PROCEDURE reset_comm(p_comm IN NUMBER);
END comm_package;

User MILLER executes the following code at 9:01am:
EXECUTE comm_package.g_comm := 15

User Smith executes the following code at 9:05am:
EXECUTE comm_package.g_comm := 20

Which of the following statement is true?
Ans  :  g_comm has a value of 15 at 9:06am for Miller

Ques : The CHECK_SAL procedure calls the UPD_SAL procedure. Both procedures are INVALID.Which command can be issued to recompile both procedures?
Ans  : ALTER PROCEDURE CHECK_SAL compile

Ques : Examine the following procedure:
PROCEDURE emp_salary
(v_bonus  BOOLEAN,
V_raise BOOLEAN,
V_issue_check in out BOOEAN)
is
BEGIN
v_issue_check:=v_bonus or v_raise;
END;
If v_bonus=TRUE and v_raise=NULL,which value is assigned to v_issue_check?
Ans  : TRUE

Ques : Which package construct must be declared and defined within the packages body?
Ans  :  Private Procedure

Ques : What happens when rows are found using a FETCH statement?
Ans  : The current row values are loaded into variables

Ques : Evaluate the following PL/SQL block:
DECLARE
result BOOLEAN;
BEGIN
DELETE FROM EMPloyee
WHERE dept_id IN (10,40,50);
result:=SQL%ISOPEN;
COMMIT:
END;

What will be the value of RESULT if three rows are deleted?
Ans  : FALSE

Ques : Which two statements among the following, regarding oracle database 10g PL/SQL support for LOB migration, are true?
Ans  : Standard package functions accept LOBs as parameters

Ques : Which command is used to disable all triggers on the EMPLOYEES table?
Ans  : ALTER TABLE employees DISABLE ALL TRIGGERS;

Ques : SQL%ISOPEN always evaluates to false in case of a/an:
Ans  : Implicit Cursor

Ques : Which datatype does the cursor attribute '%ISOPEN' return?
Ans  : BOOLEAN

Ques : Which of the following is a benefit of using procedures and functions?
Ans  : Procedures and Function avoid reparsing for multiple users by exploiting shared SQL areas

Ques : All packages can be recompiled by using an Oracle utility called:
Ans  :  Dbms_utility

Ques : Which type of variable should be used to assign the value TRUE, FALSE?
Ans  : Scalar

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER update_emp
AFTER UPDATE ON emp
BEGIN
INSERT INTO audit_table (who, dated) VALUES (USER, SYSDATE);
END;
/
An UPDATE command is issued in the EMP table that results in changing 10 rows
How many rows are inserted into the AUDIT_TABLE ?
Ans  : 1

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD UpWorkElanceTests ARSBD-JOBS DesignerTab UpLance

UpWork (oDesk) & Elance Action Script 3.0 Test Question & Answers

13:15 Add Comment
UpWork (oDesk) & Elance Action Script 3.0 Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of this skill. Lets Start test.


Ques : Which of the following methods of the XML object class can be used to add a new node to an XML object?
Ans  : appendNode()
       appendChild()
       prependChild()
 
Ques : When a variable is of the type protected, it is accessible in:
Ans  : all child classes irrespective of the package

Ques : Which of the following statements is correct?
Ans  :  The '.' and '@' operator can be used both to read and write data

Ques : What will be the output of the following code snippet?
    var myArray1 : Array = new Array ("One", "Two", "Three");
    for(var i : int=0; i<3 i="" p="">    {
        delete myArray1[i];
    }
    trace(myArray1.length);
Ans  : 0

Ques : Which of the following statement is not correct?
Ans  : While accessing child nodes of an XMLList, the array access operator '[]' can be used and the starting Index is 0.

Ques : What will be the output of the following code snippet?

    var myArray1 : Array = new Array("One", "Two", "Three");
    var myArray2 : Array = myArray1;
    myArray2[1] = "Four";
    trace(myArray1);
Ans  : One,Four,Three

Ques : Which of the following property of the String class returns the no. of characters in a string?
Ans  : length

Ques : Which of the following statements is true?
Ans  : An array is a collection of objects irrespective of the data types.

Ques : What would happen when the following piece of code is compiled and run?
var p : * = new ArrayCollection()      //Line1
p.addItem("vishal");                     //Line2
p.addItem(24);                        //Line3
p= new Date();                        //Line4
var mydate : Date = p;                  //Line5
Ans  : Compilation error at line4

Ques : Which of these is not a valid access modifier?
Ans  : All of the above are valid.

Ques : When ActionScript can immediately judge an operation to be in violation of a security rule, the __________ exception is thrown, and if, after waiting for some asynchronous task to complete, ActionScript deems an operation in violation of a security rule, the __________ event is dispatched.
Ans  : SecurityError, SecurityErrorEvent.SECURITY_ERROR

Ques : Which of the following is not a phase in the event propagation lifecycle?
Ans  : Cancelling

Ques : What will be the output of the following code snippet?

try {
    try {
        trace("<< try >>");
        throw new ArgumentError ("throw this error");
    } catch(error : ArgumentError) {
        trace("<< catch >> " + error);
        trace("<< throw >>");
        throw error;
    } catch(error:Error) {
        trace ("<< Error >> " + error);
    }
} catch (error:ArgumentError) {
    trace ("<< catch >> " + error);
}
Ans  :  << try >> << catch >> ArgumentError: throw this error << throw >> << catch >> ArgumentError: throw this error

Ques : What will be the output of the following trace statement?

trace ("output: " + 10 > 20);
Ans  : false

Ques : In the date formatter's format string, which of the following pattern letter represents minutes?
Ans  : M

Ques : Which event is triggered when a timer completes its execution?
Ans  : TimerEvent.TIMER_COMPLETE

Ques : Given the following string variable declaration, where 3 is an int

var myString : String = "These are " + 3 + " lines"

The value stored in myString is:
Ans  : These are 3 lines

Ques : The trim() method of StringUtil Class is used:
Ans  :  to remove all white spaces from the beginning and the end of the string

Ques : Given the following code snippet, what will be the output when helloWorld() is run?

public function helloWorld() : void {
    trace("Line 1" );
    var num : Number=25;
    try{
        num=num/0;
        trace ("Value of num in try: "+num.toString());
    }catch (err : IOError) {
        trace("Value of num in catch: "+num.toString());
    }finally{
        num=0;
    }
    trace("Value of num: "+num.toString());
}
Ans  :  Line1 Value of num in catch: 25 Value of num: 0

Ques :  Which of the following are primitive datatypes in Action script 3.0:
Ans  :  String

Ques : What will be the output of the following code snippet?

        var num1 : String="Hello";
        var num2:String="Hello";
        if (num1===num2) {
                trace ("Equal");
        } else {
                trace ("Unequal");
        }
Ans  : Equal

Ques : Which property of the Event object contains information about the component which generated that event?
Ans  : target

Ques : What will the output of the following trace statement?

trace(myXML..employee.(lastName=="Zmed"));
Ans  : The first employee block is printed on the console.

Ques : Given that two event listeners are registered for a component CompA as:

CompA.addEventListener(MouseEvent.CLICK, func1);
CompA.addEventListener(MouseEvent.CLICK, func2);

What will happen when a click event is fired on CompA?
Ans  : Both func1 and func2 are called.

Ques : When in application, in what order do the following events take place (starting from the first)?
Ans  :  pre-Initialize, Initialize, Creation complete, Application complete

Ques : What does the addItem() method of the ArrayCollection class do?
Ans  :  It adds an item at the end of the collection.

Ques : Given the code snippet below, what will be the value of myFlag after the 2nd assignment:
var myFlag : Boolean=false;
myFlag=Boolean (new Date ( ) );
Ans  : True

Ques : Which of the following is not a valid Action script data type?
Ans  : long

Ques : The only difference between a timer and a loop is that timers are machine speed independent while loops are not.
Ans  : False

Ques : Look at the following function declarations and then choose the correct option.

i. public function myFunction():*;
ii. public function myFunction():void;
iii. public function myFunction():String;
Ans  : i, ii & iii are all valid

Ques : Given the following instantiation of a date type variable, choose the statement which is true.

var myDate : Date = new Date()
Ans  : The value of myDate is the current time stamp.

Ques : Which of the following Errors does not occur at runtime?
Ans  : Compile time error

Ques : The useWeakReference parameter in the addEventListener method is used to:
Ans  :  make the listener eligible for garbage collection

Ques : Given the following statements about the try/catch/finally block, choose the correct option.
Ans  : Finally is optional but try and catch are required.

Ques : Based on the above mentioned declaration of myXML, how can we access the id attribute of the 'employee' tag?
Ans  : myXML.managers.employee[1].@id

Ques : Which of the following methods of the String class does not accept a regular expression as its parameter?
Ans  : substring()

Ques : Given the following code snippet:

public function helloWorld(value:int) : String {
switch(value){
  case 1:
    return "One";
    break;
  case 2:
    return "Two";
    break;
  case 3:
    return "Three";
    break;
  default:
    return "No Match";
  }
}

What will be returned if we pass call the above function as helloWorld(2):
Ans  : Two

Ques : A constant (const) variable can be initiated only once.
Ans  : True

Ques : Which of the following classes is not used to interact with the client system environment?
Ans  : ApplicationDomain Class

Ques : The minimum version of flash player required to run Action script 3.0 is:
Ans  : 9.0

Ques : Which of the following syntax would be used to call a method name helloWorld(), (defined in the html Wrapper) from actionscript?
Ans  : ExternalApplication.call ("helloWorld");

Ques : Given the declaration 'a timer', which of the following statements is correct?

var myTimer:Timer = new Timer (500,5);
Ans  :  When the timer is started, the TimerEvent.TIMER event is dispatched 5 times with a difference of 0.5 seconds between 2 successive events.

Ques : Which of the following conditions must be true to facilitate the usage of seek() function of an Array Collection's Cursor?
Ans  : None of the above

Ques : The following regular expression : var pattern : RegExp = /\d+/; will match:
Ans  : one or more digits

Ques : What does XML stand for?
Ans  : Extensible Markup Language

Ques : A String is:
Ans  : a series of zero or more characters.

Ques : Given the following code snippet:
public class Student {
    public function Student () {
        trace("Student variable created");
    }
    public function hello () : String {
        return "Hello World";
    }
}
-------------------------------------------------------
public function helloWorld () : String {
    var student1 : Student;
    return student1.hello ();
}

What will the function helloWorld() return?
Ans  : Hello World

Ques :  Which of the following types of variables can be accessed without creating an instance of a class?
Ans  : Static

Ques : E4X in Action script is used to:
Ans  :  manipulate XML data.

Ques : What will be the output of the following trace statement?

trace(myXML..employee.*.@*);
Ans  : An XMLList that includes every attribute defined on the employee tag's descendants but not on the employee tag

Ques : The default values of String and int type variables are:
Ans  : null and 0 respectively.

Ques : Which of the following statements is not correct?
Ans  :  When a timer is instantiated, it starts automatically.

Ques : While accessing the clipboard through the system manager class, we can:
Ans  : read data from the clipboard.

Ques : Given two String variables str1="Hello" and str2="World", which of the following 2 ways can be used to concatenate the 2 strings and store the result in str1?
Ans  : str1.concat(str2);

Ques : Which of the following loop structures are used to access dynamic instance variables of an object?
Ans  : for-each-in

Ques : Which of the following properties of the Date class does not accepts 0 as a value?
Ans  : date

Ques : Which class is the parent class of all custom event classes?
Ans  : Event

Ques : Suppose we have two swf's named Parent.swf and Child.swf (in the same domain), where the Child.swf is loaded inside the Parent.swf as a module, can an Event listener be registered in the Parent.swf to detect mouse click events inside the Child.swf?
Ans  : Yes, for any event

Ques :  Read the following statements and then choose the correct option.
i. A class can extend another class
ii. A class can Implement an Interface
iii. An interface can extend a class
iv. An interface can extend another interface
Ans  : Only i, ii and iv are true

Ques : Which of the following statements about the System class is true?
Ans  : It can be used to retrieve current memory usage for flash player.

Ques : The Error class serves as the base class for all run-time errors thrown by Flash.
Ans  : True

Ques : Which of the following keywords is used to bring control out of a loop?
Ans  : break

Ques : The addEventListener() method of the EventDispatcher class is used to:
Ans  : add/register a new listener for an event

Ques : Which of the following is not a security-sandbox type?
Ans  :  Remote-with-networking

Ques : If no Access modifier is specified for a property in a class, then by default, the property is:
Ans  : Private

Ques : What is the length of the given array?

var myArray1 : Array = new Array ("One", "Two", "Three");
Ans  : 3

Ques : Suppose we have an arrayCollection whose cursor (myCursor) has been created using the arraycollection's getCursor() method. At runtime, when myCursor.afterLast returns true, what is the value of myCursor.current?
Ans  : Null

Ques : Given a number, num = 23, which of the following methods will be used to convert it to a String:
Ans  : num.toString();

Ques : Which of the following is not a valid quantifier metacharacter used in Regular expressions?
Ans  : -

Ques : The compiled output of an Action script file is:
Ans  : '.swf' file

Ques : Given the following code snippet, what will be the output when helloWorld( ) is run?

public function helloWorld() : void {
    trace("Code Start" );
    try{
        throw new Error ("Test_Error");
        trace("try");
    } catch(err : Error) {
        trace("catch");
        return;
    }finally{
        trace("finally");
    }
    trace("Code End");
}
Ans  : Code Start catch finally

Ques : Which of the following is a valid variable name?
Ans  : _123

Ques : An Swf in a local security sandbox:
Ans  : can access some but not all resources in the local security sandbox.

Ques : Which kind of an error is thrown when parsing error occurs in the action script?
Ans  : Syntax error

Ques : The source of an ArrayCollection is of the type:
Ans  : Array

Ques : Which of the following is not a correct way of adding an item to an Array myArr?
Ans  : myArr.addItem(item);

Ques : Which nature of ActionScript is depicted by the use of Events?
Ans  : Asynchronous

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD UpWorkElanceTests ARSBD-JOBS DesignerTab