explain about casting of objects?
Answers were Sorted based on User's Feedback
Casting betrween object references is to refer to a object
compatible by class or interface or array type reference.
Is This Answer Correct ? | 7 Yes | 1 No |
Casting betrween object references is to refer to a object
compatible by class or interface or array type reference.
Is This Answer Correct ? | 8 Yes | 4 No |
Casting betrween object references is to refer to a object
compatible by class or interface or array type reference.
Is This Answer Correct ? | 4 Yes | 1 No |
Casting betrween object references is to refer to a object
compatible by class or interface or array type reference.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / rajesh
Casting can be applied to data types for like narrowing and
widening of primitive data types.
Casting can be applied for objects instantiated from the
inheritance hierarchy but only upward casting.
Is This Answer Correct ? | 2 Yes | 0 No |
What is the difference between hashmap and hashtable in java?
String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ?
6 Answers Flextronics, Keane India Ltd,
Differentiate between == and equals().
Can we define private and protected modifiers for the members in interfaces?
What is a pattern what is an anti pattern?
Explain exception chaining in java?
How can an exception be thrown manually by a programmer?
How do you convert an int to a double in java?
what is difference between prepare stetement and callable starement with example?
What is the use of bufferedreader?
Which api is provided by java for operations on set of objects?
Is java code slower than native code?