I'm trying to create an object of type quiz that can hold 25 objects, but whenever I print the array, I get a pointer location (random numbers "Quiz@471e30" ) instead of my string question.
Here is the Quiz class:
public class Quiz {
    private static String questions;
    public  Quiz (String ask){
        questions=ask;
    }
    public String getQuestions(){
        return questions;
    }
    public void setQuestions(String ask){
        questions=ask;
    }
}
Here is the main class:
public class QuizTime {
    public static void main(String[] args) {
        Quiz[] z= new Quiz[25];
        z[0]=new Quiz("what is your name?");
        System.out.println(z[0]);
    }
}
 
     
     
     
     
     
    