This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Metadromes in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Metadromes in Java" Watch "Metadromes in Java" New topic

Metadromes in Java

karan kampani

Joined: Sep 08, 2009
Posts: 2
Im new to Java and I am trying to write a program that inputs an integer and finds the largest number less than the number entered. Im not sure if its a metadrome but here's an example, if I enter the number 1945 then the output should be 1789
Im new to the language so i posted in this section.

David Newton

Joined: Sep 29, 2008
Posts: 12617

finds the largest number less than the number entered

I think there must be a bit more to the definition than that, otherwise you could just subtract one.

Here's one definition I found:
A metadrome is a number whose hexadecimal digits are in strict ascending order.
karan kampani

Joined: Sep 08, 2009
Posts: 2
Yea that the definition which I found as well. but im not sure if that's what I need to use for the program. Im stuck with the algorithm for the code, thats the problem
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 984

Karan, we do not do your homework.

Please provide us with what you have tried so far and we can help you.

one last thing,

Welcome to coderanch

My Website: [] Cool your mind:[] My Sally:[]
I agree. Here's the link:
subject: Metadromes in Java
jQuery in Action, 3rd edition