DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Mitigating Cache Stampedes in Dynamic API Translation Using Java 21 Virtual Threads
  • AGENTS.md Makes Your Java Codebase AI-Agent Ready
  • Going Stateless: Scaling MCP Servers to Cloud-Native Java and HTTP
  • Compliance Reporting Without Losing the Spreadsheet or the Control

Trending

  • Do We Test Just to Find Bugs?
  • AGENTS.md Makes Your Java Codebase AI-Agent Ready
  • Slopsquatting: A New Supply Chain Threat From AI Coding Agents
  • Cloud Cost Optimization Was Hard; AI Cost Optimization Will Be Worse.
  1. DZone
  2. Coding
  3. Java
  4. What is Automorphic number in Java ?

What is Automorphic number in Java ?

By 
Das Nic user avatar
Das Nic
·
Jul. 01, 15 · Interview
Likes (0)
Comment
Save
Tweet
Share
8.7K Views

Join the DZone community and get the full member experience.

Join For Free

In mathematics an automorphic number (sometimes referred to as a circular number) is a number whose square "ends" in the same digits as the number itself. 

For example, 

52 = 25, 

62 = 36,

762 = 5776, 

and 8906252 = 793212890625, 

so 5, 6, 76 and 890625 are all automorphic numbers.

And the logic behind :

int n=56;
        int d=1; int i;
        for(i=n;i>0;i=i/10)
        {
            d=d*10;
        }
        if((n*n)%d==n)
        {
            System.out.println(n+"\t"+"is Automorphic Number");
        }
        else
        {
             System.out.println(n+"\t"+"is not Automorphic Number");
            }
        }
You can check full article from Geek On Java - Hub for Java and Android 
Java (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • Mitigating Cache Stampedes in Dynamic API Translation Using Java 21 Virtual Threads
  • AGENTS.md Makes Your Java Codebase AI-Agent Ready
  • Going Stateless: Scaling MCP Servers to Cloud-Native Java and HTTP
  • Compliance Reporting Without Losing the Spreadsheet or the Control

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook