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 3 of 3

Thread: Fill

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Fill

    I am a powerbuilder programmer and currently we are migrating our PB application to java.
    In PB we have a function called fill()
    EG:
    Fill("*", 35)
    This statement returns a string whose value is 35 stars:

    is there any function like this available in java?


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Fill

    A simple for loop adding the specified count to a String (or better yet a StringBuilder) would do the trick. See
    The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
    Strings (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Fill

    Thank you..however i had already done the suggested solution yestarday..i wanted to know any function to fill like i mentioned ..
    anyways thxs for the reply ..

Similar Threads

  1. Text fill
    By IBANGS in forum JDBC & Databases
    Replies: 1
    Last Post: May 26th, 2010, 03:42 AM
  2. Auto Fill the TextField
    By malladiG in forum Java Theory & Questions
    Replies: 0
    Last Post: April 6th, 2010, 07:32 AM
  3. Fill & sort an array
    By yroll in forum Collections and Generics
    Replies: 2
    Last Post: April 1st, 2010, 06:00 AM
  4. Fill array concurrently
    By mamba in forum Collections and Generics
    Replies: 2
    Last Post: October 15th, 2009, 07:08 PM
  5. How do I fix my program so I can use the keyboard to type in the numbers?
    By rocafella5007 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: April 29th, 2009, 02:39 PM