It doesn't give me the answer for Integer in hex? Why?
<pre><code>public static void main (String[] args){

        Scanner in = new Scanner(System.in); 

        int n = 0; 

        System.out.print("Enter positive number: "); 

        n = in.nextInt(); 

       String s1 = "";

       s1 = ( n % 2) + s1 ; 

                   n = n % 2;
                   n=n/2;
</code></pre>
