Question: I have class as mentioned below:  

```
 public class Test {
     public Test1 a;
     public Test2 b;
 }

```

Now I have 2 threads. 

Thread 1 modifies "Test1" and thread 2 modifies "Test2"  

Can there be a possibility of data corruption i.e. while thread 1 was modifying "Test1" class, but inbetween thread 2 came in and started modifying "Test2" and thus the changes were lost or data was corrupted/incomplete update ?

Answer: 
Something like this

```css
div {
  position: relative;
  text-align:center;
}

img {
  border-radius: 100%;
  border:1px solid #000;
  height:150px;
  width:150px;
}

hr {
  position: absolute;
  width: 555px;
  top:50%;
  z-index:-1;
  border-color: #000;
  margin:0;
}
```

```html
<div>
  <img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300" alt="Image"/>
  <hr>
</div>
```
As per discussion you're looking to build the border around the image but the position i'm not sure of your requirement .

`<img src="something.jpeg" class="img"/>`

For a simple thin border:

```
img { 
   border:1px solid #021a40;
   height:150px;
   width:150px;
}

```

The "Double Border":

```
img {
   padding:1px;
   border:1px solid #021a40;
   height:150px;
   width:150px;
}

```

Double Border with different inside border color:

```
img {
   padding:1px;
   border:1px solid #021a40;
   background-color:#ff0;
   height:150px;
   width:150px;
}

```