Too Long; Didn't Read
There are several articles on how to check in Java whether a number is Automorphich or not. An Automorphic Number is a number whose square has the exact number as its last digit. With a loop check if the last digits of both numbers are the same or not can be checked with a simple condition `(n % 10 == sq % 10)’ With the help of a counter variable (here c) take a record of how many last digits are similar. Outside the loop, check with an if-else condition whether the counter variable is greater than 0.