what I am looking to do here is create a string based on the value of an int.
I know I am able to create a vale of an in based on a sting via the length()
method but was wondering how to do the opposite.
for example I have an int of 30, with that int I would like to create 30 dots ina line based on that int and place it in a println
{
while (wordlegnth1 + wordlegnth2 < LINELENGTH)
{
dots++;
wordlegnth1++;
}
System.out.println (word1 + dots + word2);
}
at the moment, al the println does is prints the 2 words entered, the int value based on the 2 words entered eg stack24overflow
basically what I would like to do is change that 24 from an int into 24 dots (........................)
many thanks :)