Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: java code to create ticket

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java code to create ticket

    hi,
    i need java code to creat uninque id each time i submit a form.
    how i can crate it.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: java code to create ticket

    What kind of id? A numeric value that is incremented by 1 each time?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java code to create ticket

    Quote Originally Posted by Norm View Post
    What kind of id? A numeric value that is incremented by 1 each time?
    Hi Norm, Thanks for replying , Actually i need to create a helpdesk system, that will generate such id which is increamented each time by 1 but it would be prifixed with some string symbol like:- prabhat0000001,prabhat0000002,
    regarding this id i will save all data regarding customer problem. i.e in each row this will be primary key field.
    Pls Help me.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: java code to create ticket

    Can you explain what your problem is now?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Apr 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java code to create ticket

    Actually my problem is how to create such unique id i.e java code to create it.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: java code to create ticket

    how to create such unique id
    What about this: A numeric value that is incremented by 1 each time?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Apr 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java code to create ticket

    Quote Originally Posted by Norm View Post
    What kind of id? A numeric value that is incremented by 1 each time?
    yes numeric value increamented by 1 each time

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: java code to create ticket

    That would be done by using an assignment statement. For example:
    id = id + 1;
    or
    id++;
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Apr 2013
    Location
    Ethiopia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java code to create ticket

    just give it a constant variable preceding the variable that is used to increase by 1. and do not forget to be out putted like this System.out.println(Constant variable + the increment variable);

Similar Threads

  1. Replies: 14
    Last Post: March 14th, 2012, 07:17 PM
  2. Parking Ticket Simulator Help (Almost done, few errors)
    By TitanVex in forum Object Oriented Programming
    Replies: 7
    Last Post: December 5th, 2011, 05:06 PM
  3. bingo ticket loop problem (doesn't compile like it should...)
    By mv740 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: November 14th, 2011, 04:21 PM
  4. lotto ticket generator help
    By tlckl3m3elmo in forum What's Wrong With My Code?
    Replies: 19
    Last Post: July 15th, 2011, 12:39 AM