What are primitive type wrappers classes? - Java

What are primitive type wrappers classes? Explain the purpose of primitive type wrapper classes

Primitive type wrapper classes or simply wrapper classes are available in java.lang package for providing object methods for all the eight primitive types. All the wrapper class objects are immutable.

A primitive type data element can have the advantages of an object by converting it into its corresponding wrapper class object. The wrapper classes are extensively used along with the Collection framework. Thus it enhances the application’s performance further.

Java 5.0 has additional wrapper classes known as atomic wrapper classes. They are available in java.util.concurrent.atomic package. These classes are mutable. These can not be utilized as a replacement for the wrapper classes. They provide atomic operations for addition, increment and assignment. The atomic wrapper classes are AtomicInteger, AtomicLong, AtomicBoolean, AtomicReference<v>.
Why do you recommend that the main thread be the last to finish? - Java
In an application, a program continues to run until all of the threads have ended. Hence, the main thread to finish at last is not a requirement. It is a good programming practice to make it to run last to finish...
Why does Java have two ways to create child threads?
Java threads can be created graciously in two ways: implementing the Runnable interface and extending Thread class...
Tips on effectively using Multithreading - Java
In multiple processor systems, a large algorithm will split the process into threads. So that different processors can handle different threads...
Post your comment