Java
                                
                                 Java copied to clipboard
                                
                                    Java copied to clipboard
                            
                            
                            
                        fix: handle zero case in Armstrong number check to avoid Math.log10(0…
Adds a safe check for number == 0 in the Armstrong number logic to avoid a Math.log10(0) exception. Also acknowledges 0 as a valid Armstrong number (since 0^1 = 0).
Why: Without this, passing 0 causes an ArithmeticException due to log10(0). This PR ensures the code handles all valid inputs correctly.