Results 1 to 3 of 3

Thread: String Creation

  1. #1
    CyberJayZ is offline Member
    Join Date
    May 2016
    Posts
    1
    Rep Power
    0

    Question String Creation

    Hello, I have a question about how to define a string. If I want to add an int variable after some characters, so that if the integer is changed, the string can be changed as well. I know int and string are different types. Can I just put it this way?


    int number=10;
    String test="It shows "+number;


    Thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: String Creation

    Can I just put it this way?
    Did you try writing a test program to see what happens?
    If you have problems with your test program, post the code and describe the problems you are having with it.
    Be sure to wrap the code in code tags.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Xeroxis Labz is offline Member
    Join Date
    May 2016
    Location
    Puerto Rico
    Posts
    2
    Rep Power
    0

    Default Re: String Creation

    Hi Cyber!

    I would agree with Norm, can you provide us with some code or a snippet of what you're trying to do?

    Assuming the last snippet, everything seems ok.

Similar Threads

  1. Replies: 0
    Last Post: 05-18-2012, 02:29 PM
  2. GUI Creation
    By swiftshadow329 in forum New To Java
    Replies: 1
    Last Post: 04-24-2012, 01:57 AM
  3. String/ object creation/ efficiency
    By mac in forum New To Java
    Replies: 5
    Last Post: 06-06-2010, 03:57 PM
  4. String Object Creation
    By indranil in forum New To Java
    Replies: 1
    Last Post: 04-13-2010, 12:30 PM
  5. bmp creation
    By makpandian in forum New To Java
    Replies: 1
    Last Post: 12-17-2008, 06:33 PM

Tags for this Thread

Posting Permissions

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