Explain what the following code will display? 2.5 or 3 $a=012; echo $a/4;
When any number is preceded by a 0 in PHP, then the number is treated as an octal number (i.e. base-8). Therefore the octal number 012 is equivalent to the decimal number 10. So when 10 divided by 4 gives 2.5
What will happen if we put a return statement or System.exit () on try or catch block? Will the finally block get executed?
This is a tricky Java question because most programmers think that no matter what, but the finally block will always execute. Actually, in Java the finally block will execute even if you put a return statement in the try block or catch block but finally block will not run if we call System.exit() from try or catch block.
What is the actual difference between HTML and HTML5?
HTML is basically a simple language for laying out text and images on a web page, while HTML5 acts as an application development platform that can do what HTML does and a lot more, including better support for audio/ video, & interactive graphics. It has quite a few new elements, supports offline storage of data for applications, and has more strong exchange protocols. Hence, proprietary plug-in technologies like Microsoft Silverlight, Adobe Flash, and Sun JavaFX are no longer needed, because browsers are now able to process these elements without additional requirements.