• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to Generate alpha numeric no  RSS feed

 
chinna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
--------------------------------------------------------------------------------

i need to Generate a unique id which contains 14 numeric and one Alphabatic which i need to increment it whenver i call the Function.

Eg: A00000000000001 to A99999999999999

and it should start from B00000000000001 to .......etc

Can anybody help me regarding this for generating it..

Thanks in advance....
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi buddy,
can you please check the ranch's naming policy and change your name accordingly ? Thank you
http://www.javaranch.com/name.jsp
 
chinna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i changed my Name.., Is it ok.., i dont think my last name was aganist policy
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for trying, but display names need to be first and last names, separated by a space please.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can describe the algorithm in more detail, it will make it easier for you to build.
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when will the leading alpha change?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imagine a little class that has two private member variables. One is a long number and the other is a char. These might have initial values of 0 and 'A'. Describe in plain English the rules you'd use when somebody calls the getNextId() method ... can you picture those rules in code?
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"chinna"

Your name still does not conform to the JavaRanch Naming Policy. Please review the policy and update it appropriately. This is your second warning.

Scott Selikoff
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!