In this section you will learn about Wrapper classes and all the methods that manipulate data and allows to operate a certain work.
Wrapper Class Tutorial and Examples
- Wrapper Classes
In this section you will learn about Wrapper classes and all the methods that manipulate data and allows to operate a certain work.
- Insert an element with the
add(int, Object) method
In this section you will learn to insert an element at the specified position using the add(int, Object) method. Here is an example that provides the usage of the add(int, Object) method in more detail.
- Insert an
object with the add(Object) method
In this section you will learn to insert an object at the end of a list using the add(Object) method. Here is an example that provides the usage of the add(Object) method in more detail.
- Insert an
array list of objects with addAll(ArrayList) method
In this section you will learn to insert an array list of objects to another list. Here is an example that provides the usage of the addAll(Arrayist) method in more detail.
- To Retrieve a Particular
Object From an ArrayList
In this section you will learn to retrieve an ArrayList object (that contains multiple elements) using the get() method. Here is an example that provides the usage of the get() method in more detail.
- Convert an Integer
type object to a String object
In this section you will learn to convert the Integer type object to a String object using the Integer.toBinaryString() and Integer.toHexString() methods.
- Retrieve the dynamic
capacity of a list
In this section you will learn to get the capacity of a list i.e. retrieving the number of objects contained in it. Here is an example that provides the usage of the size() method in more detail.
- Remove a value with
remove() method
In this section you will learn to remove an object from a particular position specified by a index value. Here is an example that provides the usage of the remove() method in more detail.
- Replace an object with
set(int, Object) method
In this section you will learn to replace an object from a particular position specified by a index value. Here is an example that provides the usage of the set(int, object) method in more detail.