@@ -0,0 +1,774 @@
+package com.matao.fundamentals.exercises;%0A%0A/**%0A * Created by matao on 2018/8/21.%0A * %3Cp%3E%0A * Write a code fragment that puts the binary representation of a positive integer N into a String s.%0A * %3Cp%3E%0A * Solution: Java has a built-in method Integer.toBinaryString(N) for this job,%0A * but the point of the exercise is to see how such a method might be implemented.%0A */%0Apublic class Ex_1_1_09 %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        int N = 100;%0A        System.out.println(Integer.toBinaryString(N));%0A%0A        System.out.println(toBinaryString(N));%0A    %7D%0A%0A    public static String toBinaryString(int number) %7B%0A        String result = %22%22;%0A        for (int i = number; i %3E 0; i /= 2) %7B%0A            result = (i %25 2) + result;%0A        %7D%0A        return result;%0A    %7D%0A%7D%0A

add solution to exercise 1.1.9