I am trying to have the output alternate between string institution and string prefix. Example
1.Institution: UCF
1.Prefix: CGS
2.Institution: USF
2.Prefix: COP
so on and so forth...
I want to print The first variable from each String together (print the 1's together and print the 2's together.
package catalog; public class Course {
private String[] institution = {"UCF", "USF", "UM", "FSU", "FS"};
private String[] prefix = {"CGS", "COP", "COP", "CGS", "CIS"};
public Course() {
for(String i: institution) {
System.out.println("Institution: "+i);
for (String p: prefix)
System.out.println("Prefix: "+p);}
}
public static void main(String[] args) {
System.out.println("Transcripts for BN");
new Course();
}
}