-
-
What is the difference between actual parameters and formal parameters?
Actual parameters are parameters passed to the method when the method is invoked by a method call, and can vary from call to call. Formal parameters are parameters defined in the method definition.
-
Whether the java uses call_by_value parameter passing strategy or call-by-reference parameter passing strategy?
The parameter passing strategy in Java is call-by-value and not call-by-reference, regardless of the type of the parameter.
-
Explain the contexts in which binary numeric promotion applies?
Binary numeric promotion is applied in the following contexts:1.operands of the arithmetic operators *, /, %, +, and - 2.operands of the relational operators = 3.operands of the numerical equality operators == and != 4.operands of the integer bitwise operators &, ^, and |
-
-
If the array size is negative,what will happen?
If the array size is negative, a NegativeArraySizeException is thrown
-
Can a statement have a multiple labels?
yes.A statement can have multiple labels:ex:Label1: Label2: System.out.println("Mutliple labels. ");
-
-
What is unary numeric promotion states?
Unary numeric promotion states thatIf the single operand of the operator has a type narrower than int, it is converted to int by an implicit widening primitive conversion; otherwise, it is not converted
-
-
-
How can we calculate the shift distance in shift operators?
The shift distance is calculated by AND-ing the value of the right-hand operand with a mask value of 0x1f (31) if the left-hand has the promoted type int, or using a mask value of 0x3f (63) if the left-hand has the promoted type long. This effectively means masking the five lower bits of the right-hand operand in the case of an int left-hand operand, and masking the six lower bits of the right-hand...
-
-
-
-
How to disable one column in table.
I have one table, in which I want one column (contents )to be NON DELETABLE by user, while rest (contents)are editable and deletable.How to do that??keeping .setenabled(false) makes every column non deletable.
-
What are the legal modifiers to local inner classes?
Final or abstract but not both at the same time.
-
Is garbage collection concept platform dependent/indepentdent?
Platform dependent.
-
Is thread concept platform dependent or independent?
Platform dependent.
-
Java Interview Questions
Ans