When Joseph was in jail, two works of the king of Egypt one is butler and anthor is baker were put in the prison, where Joseph was there. Both the butler and baker dreamed a dream, but nobody was there to interpret their dreams. In the morning Joseph called on them, and found they are in sad mood, Joseph enquired about their condition, they said about their dreams, and further said nobody is there to interpret their dreams. Joseph said interpretations belong to God.
Butler told his dream to Joseph, that is " A wine was before me, and it has three branches, it is full of buds and blossoms and full of ripe grapes, and pharaoh's cup was in my hand, I took the grapes and pressed them into pharaoh cup, and I gave it to pharaoh's hand. " Joseph interpreted like this " Three branches are three days, within three days pharaoh restore your job. " Joseph requested the butler to remember him in the presence of pharaoh, to come out from the jail.
The baker told his dream like this " I had three white baskets on my head filled with all kinds of bake-meats for pharaoh, but birds ate all of them. " then Joseph said with in three days you will be hanged by pharaoh and your flesh will be eaten by the birds.
" God gave knowledge to Joseph to interpret the dreams because he believed, interpretations belong to God. "
~ Genesis Chapter 40