Java trivia project 2

Java trivia project 2 - student project

package net.MojaveMF;


import java.util.Locale;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {

int score = 0;


addquestion("Who made this game?","MojaveMF");

addquestion("How much letters are in Hello","5");

addquestion("Are you a robot","No");

boolean play = true;

while(play) {
score = load(Globals.questions);
print("Your score is " + score);
print("Play again?");
Scanner hi = new Scanner(System.in);
play = hi.next().toLowerCase().equals("yes");
}
}

public interface Globals{
String[][] questions = new String[3][2];
}

public static int returnlength(String[][] array) {
int filled = 0;
for (int i = 0; i length; i ++){
boolean value = array[i][1] == null;
if (!value) {
filled++;
}
}
return filled;
}
public static void addquestion(String question,String Awnser){
int length = returnlength(Globals.questions) ;
System.out.println(length);
Globals.questions[length][0] = question;
Globals.questions[length][1] = Awnser.toLowerCase();

}
public static int load(String[][] arraylist) {
int score = 0;
for (int i = 0; i length; i ++){
score = score + question(arraylist[i]);
}
return score;
}

public static void print(Object obj){
System.out.println(obj);
}
public static int question(String[] questions) {
Scanner hi = new Scanner(System.in);
String question = questions[0];
String awnser = questions[1];

int tempscore = 0;

print(question);
boolean Correct = awnser.equals(hi.next().toLowerCase());
if (Correct == true){
print("Correct");
tempscore++;
}else{
print("Wrong");
}
return tempscore;
}
}