Bubble sort algorithm in Java
Your code looks mostly good to me.

One thing: Functions can help increase readability of your code, and reduce the amount of duplicate code. Additionally, they make testing and (re-)using your code easier. Your main method should only be an entry point, it shouldn't really contain any logic itself.

Your main method might look like this:

public static void main(String[] args) {
    int[] array = new int[] { 4, 1, 8, 5, 2, 0, 4, 3, 7, 9 };

    printArray(array);
    int[] sortedArray = sortArray(array);
    printArray(sortedArray);      
}


Then just create those functions. 

Misc


You have some unnecessary newlines after }. 
temp could be renamed swap, making it more obvious what is happening.
arr could be named array (arr may be fine in this context, but generally, you do not want to shorten your variable names, as it is less readable).