Results 1 to 2 of 2
  1. #1
    moaxjlou is offline Member
    Join Date
    Oct 2008
    Posts
    23
    Rep Power
    0

    Default String to Object conversion

    Hello
    I am trying to add a String into an arrayList using the add() method. The problem is, add() only accept Object as the parameters.

    Does anybody know how to convert String into Object?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    A String is an Object. Are you getting an error when you try this? If so, post the code and the error message.

Similar Threads

  1. String to Integer Conversion in JSP
    By vinikz in forum New To Java
    Replies: 8
    Last Post: 11-10-2010, 03:45 PM
  2. string conversion??
    By j2vdk in forum New To Java
    Replies: 13
    Last Post: 09-19-2008, 04:35 PM
  3. bytearray to string conversion
    By mew in forum New To Java
    Replies: 1
    Last Post: 01-28-2008, 11:39 AM
  4. Method for String to int conversion
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-02-2008, 07:35 PM
  5. String to Date conversion
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 11-06-2007, 08:16 PM

Posting Permissions

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