Answer:
It seems your code is working, but you may want to replace your first print statement with following so that your last digit will be concatenated to other numbers
System.out.print("The ISBN-10 number is " + d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9);
Step-by-step explanation:
Let's go through your code and see what it does.
You asked the user for the 9 digit number. Then, you used division and modulo to get each digit of the given number. You calculated the last digit using the given formula. After that, you check the checksum to decide the last digit of the number. If the checksum is equal to 10, the last digit is denoted as X. Otherwise, it is the digit itself.
Finally, you print the whole 10 digit number