View Single Post
  #2 (permalink)  
Old 11-30-2007, 07:29 AM
Eranga's Avatar
Eranga Eranga is online now
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,031
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I'll give a simple code here. Here the output developed by using characters. So have to think about a way to concatenate those characters and make as strings.

Code:
public class StringTest { public static void main(String[] arguments) { String s1 = "abc"; String s2 = "123"; int s1Len = s1.length(); int s2Len = s2.length(); for(int temp1 =0;temp1 < s1Len;temp1++) { for(int temp2 = 0;temp2 < s2Len;temp2++) { char ch1=s1.charAt(temp1); System.out.print(ch1); char ch2=s2.charAt(temp2); System.out.println(ch2); } } } }
Check there how final strings are obtained using print() and println()
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote