Character can be formed not only by our genes it may be by the atmosphere where are grown, society and our mind.
But some characters and behaviours born along with us. Suppose, you take 2 kids of 1 month age...who does not know anything. They are so young that they can't learn from their surroundings. Can you say, both these kids, even if brought by same parents behave in the same way. Never.....
You can even consider twins. Soon after birth, one may like to wake full day and sleeps well at night without disturbing others. But the other may be just opposite. As they grow we can see many differences in them, even if they are born to same parents and are growing in same conditions. Likes and dislikes of both kids will also be different. One may intake food well, but parents may find it difficult to feed the other. One may be naughty while the other kid may be quiet. Why they differ in their character, even if born in same conditions and brought up by same people in same condition? It's because, both differ by characters and these variations are due to genes.