Line1 Value of num in try: 25 Value of num in catch: 25 

, 4.

Line 1 Value of num in try: Infinity Value of num: 0 

">
MCQs > IT & Programming > Actionscript 3 > What's 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()); }

Actionscript 3 MCQs

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());

}

Answer

Correct Answer:

Line 1 Value of num in try: Infinity Value of num: 0 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Actionscript 3 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Actionscript 3 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it