|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: What is casting?
Answer: There are two types of casting, casting between primitive numeric types and casting between objectreferences. Casting between numeric types is used to convert larger values, such asdouble values, tosmaller values, such as byte values. Casting between object references is used to refer toan object by acompatible class, interface, or array type reference.
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 10167 users |
Added on |
10/13/2009 |
Views |
76174 |
Rate it! |
|
|
Question:
What is casting?
Answer:
There are two types of casting, casting between primitive numeric types and casting between objectreferences. Casting between numeric types is used to convert larger values, such asdouble values, tosmaller values, such as byte values. Casting between object references is used to refer toan object by acompatible class, interface, or array type reference. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the return type of a program's main() method?
|
View Answer
|
|
Name four Container classes?
|
View Answer
|
|
What is the difference between a Choice and a List?
|
View Answer
|
|
What class of exceptions are generated by the Java run-time system?
|
View Answer
|
|
What class allows you to read objects directly from a stream?
|
View Answer
|
|
What is the difference between a field variable and a local variable?
|
View Answer
|
|
Under what conditions is an object's finalize() method invoked by the garbage collector?
|
View Answer
|
|
How are this() and super() used with constructors?
|
View Answer
|
|
What is the relationship between a method's throws clause and the exceptionsthat can bethrown during the method's execution?
|
View Answer
|
|
What is the difference between the JDK 1.02 event model and the event delegation model introduced with JDK 1.1?
|
View Answer
|
|
How is it possible for two String objects with identical values not to be equal under the ==operator?
|
View Answer
|
|
Why are the methods of the Math class static?
|
View Answer
|
|
What Checkbox method allows you to tell if a Checkbox is checked?
|
View Answer
|
|
What state is a thread in when it is executing?
|
View Answer
|
|
What are the legal operands of the instanceof operator?
|
View Answer
|
|
How are the elements of a GridLayout organized?
|
View Answer
|
|
What an I/O filter?
|
View Answer
|
|
If an object is garbage collected, can it become reachable again?
|
View Answer
|
|
What is the Set interface?
|
View Answer
|
|
What classes of exceptions may be thrown by a throw statement?
|
View Answer
|