
-----------------------------------
QuantumPhysics
Tue Oct 23, 2012 6:05 pm

Printing output arrray
-----------------------------------
In Computer Science class our teacher gave us about 400 little assignments we had to complete throughout the school year. I rushed ahead and completed all of them 3 months early. This is the only one that has been a pain for me. I cannot understand why the program terminates at final output after the response was given. It does not output the results, it just terminates in my console. I remade the same program in C and it worked flawlessly. I don't understand why it doesn't work here. Would someone care to explain?

Thank-you ~ QP

[code]
/**
 Written by: CodeMaeTrix
 Teacher: Dowlut
 Date Written: 23/10/12
 Header: Arrays - Question 5
 **/

import java.util.*;
public class arrays5 {
	public static void main (String args[]){
		Scanner input = new Scanner(System.in);
		String indentName, response;
		int pass[] = new int[10];
		int fail[] = new int[10];
		int mark[] = new int[10];
		String passName[] = new String[10];
		String failName[] = new String[10];
		String lastnFirstn[] = new String[10];
		
		for (int i = 0; i = 50){
				mark[i] = pass[i];
				indentName = passName[i];
			}
			else if (mark[i] < 50){
				mark[i] = fail[i];
				indentName = failName[i];
			}
		}
		System.out.println("Would you like to see all pass' or all fails: ");
		response = input.next();
		if (response == "pass"){
			for (int i = 0; i 