Georges Vanie

Greenhorn
+ Follow
since Aug 13, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Georges Vanie

Thanks Erenst!

You point me to the right direction. Now I could print out

Header 1 p1p2p3
Header 1 p4p5p6
Header 1 p7p8p9


The rest 2 elements will be easy to handle...


Thanks again and all the best to you!


Georges
17 years ago
Hi,

I'm stuck on how to archive this....any help would be highly appericated! Thanks in advance!


Let's say I have a string array:
String[] tmpPattern = {"p1","p2","p3","p4","p5","p6","p7","p8","p9", "p10", "p11"};

and a header:
String tmpHeader = "Header 1";

Need to print out ---->

Header 1 p1 p2 p3
Header 1 p4 p5 p6
Header 1 p7 p8 p9
Header 1 p10 p11





public class Main {

public static void main(String[] args) {
String tmpHeader = "Header 1";
String[] tmpPattern = {"p1","p2","p3","p4","p5","p6","p7","p8","p9"};
myTest(tmpHeader,tmpPattern);

}

public static void myTest(String header, String[] pattern){


for (int j =0; j <pattern.length; j++){
/*
help needed

*/

}
}

}


Georges
17 years ago