Answer Posted / guest
The wrapper classes can take constructors of either the
type they are designed to wrap or of a String that can be
converted to that type. Thus the Integer class can take a
number that could be contained by an int, but an error will
occur if you try to pass a number with a floating point
component. Remember that the wrapper classes are just that
classes, they are not primitives and instances of the
wrappers can only be manipulated in the same way as any
class. You may get questions on the exam with code that
uses standard math operations to manipulate instances of
wrappers. You can of course use the + operator where it
would implicitly call the toString method, but as soon as
you see the - * or % operator, beware.
| Is This Answer Correct ? | 7 Yes | 8 No |
Post New Answer View All Answers
When is the garbage collection used in Java?
What is the difference between an inner class and a sub-class?
What are the topics in advance java?
Whats the difference between notify() and notifyall()?
Is binary a low level language?
What is better- service oriented or batch oriented solutions?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
How to make a read-only class in java?
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?
What is split return?
What is bubble sort in java?
Can you change array size in java?
What does it mean that strings are immutable?
What are the restrictions imposed by a Security Manager on Applets?.
What does %4d mean in java?