# Basic Operations

A couple of basic operations in Java will help you solve these questions.

* contains() method
    
* String.valueOf() method
    
* To use ArrayList
    

# Methods

## contains()

When we look at the String.java class, we can see its implementation.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703416067688/cee63978-8af1-4332-88ad-24f06b7d3333.png align="center")

To understand this we also need to know indexOf() method's implementation.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703416283145/6b3796b8-bcca-4028-a9f2-7dd4bb04e4a0.png align="center")

There is something used as 'value'. It was defined at the beginning of the class:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703416864032/32810a3d-645b-4fbc-9d89-d371bcf63e60.png align="center")
