1. Are JVM's Platform Independent?
Answer : JVM'S are not platform Independent. JVM'S are platform Specific.
2. What is the base class of all classes?
Answer : java.lang.Object
3. Can we mark constructors final?
Answer : No, Constructor cannot be declared final.
4. Is it possible to overload main() method of a class?
Answer : Yes, we can overload main() method as well. But every time public static main(String[] args) will be called automatically by JVM. Other methods need to call explicitly.
5. Can we inherit the constructors?
Answer : No, we cannot inherit constructors.
We can call super class constructors from subclass constructor by using super() call.
6. Is null a keyword?
Answer : "null" is not a keyword. .null is a literal.
7. what is the value of variable "currentDate" of this javaScript Code if current Date of System is 6-July-2015 -
var date=new Date();
var currentDate=date.getDate()+'-'+date.getMonth+'-'+date.getFullYear();
(A) 6-7-2016 (B)6-6-2016
(C) 6-july-2016 (D)null
8. What state does a thread enter when it terminates its processing?
Answer : When a thread terminates its processing, it enters the dead state.
9. Can we write empty interface?
Answer : Yes it is possible it is marker interface.
10. When we need to use extends and implements?
Answer : A class will implements an interface.
A class will extends another class.
An interface extends another interface.
11. full form of JSON ?
Answer : JavaScript Object Notation.
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.
12. Which language use strictfp keyword ?
Java (strictfp is a keyword in the Java programming language that restricts floating-point calculations to ensure portability. The strictfp command was introduced into Java with the Java virtual machine (JVM) version 1.2 and is available for use on all currently updated Java VMs.Without using strictfp keyword, the floating point precision depends on target platform’s hardware, i.e. CPU’s floating point processing capability. In other words, using strictfp ensures result of floating point computations is always same on all platforms. )
The strictfp keyword can be applied for classes, interfaces and methods.
Rules
strictfp cannot be applied for constructors.
If an interface or class is declared with strictfp, then all methods and nested types within that interface or class are implicitly strictfp.
strictfp cannot be applied for interface methods.
read more
13. which type of keyword is not allowed if we use strict keyword in javascript?
Answer : Future reserved keywords are not allowed in strict mode. These are:
implements
interface
let
package
private
protected
public
static
yield
The purpose of "use strict" is to indicate that the code should be executed in "strict mode".
Strict mode makes it easier to write "secure" JavaScript.
Strict mode changes previously accepted "bad syntax" into real errors.
As an example, in normal JavaScript, mistyping a variable name creates a new global variable. In strict mode, this will throw an error, making it impossible to accidentally create a global variable.
In normal JavaScript, a developer will not receive any error feedback assigning values to non-writable properties.
Strict mode is supported in:
Internet Explorer from version 10. Firefox from version 4.
Chrome from version 13. Safari from version 5.1. Opera from version 12.
Winner is Neha Gupta, Taruna Kunwar, Chetan Bharti, Mehander
Comments
Post a Comment