dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: TYpe casting integer to string

  1. #1
    Join Date
    Feb 2004
    Location
    Brasil porto Aelgre
    Posts
    544

    TYpe casting integer to string

    Hi
    I need take a method wich return an integer and type casting to String.

    eg.:
    objMyObject.getiCode()

    to : toSting(objMyObject.getiCode)

    How it can be done?
    Wich packages do i must use ?

    Thank´s in advance

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    you can make an integer of type String by using multiple appoaches e.g.
    int n=11;
    String s1 = ""+n;
    String s2 = String.valueOf(n);
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles