easy questions


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: easy questions

  1. #1
    Join Date
    Oct 2004
    Posts
    18

    easy questions

    Hi there,

    I have 2 easy questions.

    1. how do you add an integer into an array? I know how to add a text to an array (array.add("text")), but I dont know how to add an integer.

    2. How to convert data type integer to datatype text.

    Thanks!!!

  2. #2
    Join Date
    Feb 2004
    Posts
    541
    Arrays don't have methods, so you can't add anything to an array with array.add(). Arraylists on the other hand have methods, and you would add things to them with that method. Are you really using an arraylist instead of an array?

    As for turning integers into strings, you use the Integer.toString(anInt) method.

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center