-
What are covariant return types?
A method in a subclass returning an object whose type is a subclass of the type returned by the method with the same signature in the superclass.
-
What does final parameters mean in a method.does a innerclass only access final parameters from the parameter list if its defined inside a method.Code:type methodA(final int parm1,int parm2){class inner{// -- is onlt parm1 accessible or parm2 is also accessible}}
I did not check it in a JVM but even i can decide which is accessible. I wanna know the cocept of final parameters.
-
-
System.out.println(Float.parseFloat(x));
it gives infinity.
so, how to catch it?
">How to check infinity value ? i took very large number as string when i cast to float it gives infinity value. how to check at runtime or how to catch it?ex : String x = "111111111111111111111111111112222222222222222222222222222112222";System.out.println(Float.parseFloat(x));it gives infinity.so, how to catch it?
-
-
-
-
-
-
-
-
Open Excel sheet in Java
My java code needs to open an excel sheet and import data from the excel sheet. How can do that?
-
-
Swing's text components display text and optionally allow the user to edit the text
Skill/Topic: AWT & AppletsA) TrueB) False
-
Thread class is defined in the package ______
Skill/Topic: AWT & AppletsA) java.lang
-
Each subclass ________ state (in the form of variable declarations) from the superclass
Skill/Topic: InheritanceA) Inherits
-
-
-
You do not need to follow any special indentation rules in Java
A) TrueB) FalseExplanation: Java is a free-form language
-
A constant value in Java is created by using a literal representation of it
A) TrueB) FalseExplanation: A constant value in Java is created by using a literal representation of it. For example, here are some literals:100 98.6 'X' "This is a test"Left to right, the first literal specifies an integer, the next is a floating-point value, the third is a character constant, and the last is a string. A literal can be used anywhere a value of its type is allowed
Java Interview Questions
Ans