Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2008, 01:22 PM
Member
 
Join Date: Jul 2008
Posts: 20
suprabha is on a distinguished road
[SOLVED] auto generated numbers
hi all
i need java code to auto generate numbers in seial order..pls find a code...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-08-2008, 05:44 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
Quote:
seial order
What does that mean? Can you give an example?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-08-2008, 11:01 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
for (int i =0; i < Max; i++) {
/// use i for something
}
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-11-2008, 10:23 AM
Member
 
Join Date: Jul 2008
Posts: 20
suprabha is on a distinguished road
its generating number automatically whenever we log into one page...i have code to generate in random way..but i need in serial order
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-11-2008, 02:25 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Still not clear what you are looking. You can randomly generate a number, but what you mean serial order?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 08-11-2008, 03:56 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
new number = old number + 1

This generates numbers in serial order.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 08-11-2008, 09:41 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by suprabha View Post
i have code to generate in random way..but i need in serial order
You are not explaining your question well. It is impossible to have "random" numbers be in sequential order. Something has to change, you have conflicting requirements.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 08-12-2008, 05:21 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes it is. May be he's looking to order them in acceding or descending order. But it's not possible with random numbers. But you can tricky there. Each random number store in an array list, and just after adding number to the list sort the list. But this is useless because waste lots of resources. Just think what happened if you need 1000 random numbers.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 08-12-2008, 04:45 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 880
Nicholas Jordan is on a distinguished road
psuedo random?
Quote:
Originally Posted by fishtoprecords View Post
.... It is impossible to have "random" numbers be in sequential order. .....
Psuedo-random probably, your the master so suggest original poster read the docs for Random.next.... Likely will do what is needed. identical sequences of numbers
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 08-13-2008, 10:05 AM
Member
 
Join Date: Jul 2008
Posts: 20
suprabha is on a distinguished road
thank you all for responding..i got the solution
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 08-14-2008, 07:13 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by suprabha View Post
..i got the solution
You should post your solution so others with the same problem can learn as well
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IDE with auto completion? iceflyin New To Java 8 04-21-2008 03:07 PM
Retrieving auto generated key (JDBC 3.0) JavaForums Java Blogs 0 04-19-2008 09:50 PM
getting dynamically generated valus abhiN JavaServer Pages (JSP) and JSTL 2 03-29-2008 12:58 PM
passing dynamically generated values abhiN Advanced Java 1 01-20-2008 05:21 AM
Generated servlet error tommy JavaServer Pages (JSP) and JSTL 1 08-05-2007 12:46 PM


All times are GMT +3. The time now is 09:30 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org