Suppose I have an object of class Student, which has the following fields:
String name;
int age;
int roll_number;
And I instantiate like so:
Student A[] = new Student();
Now, is there a way to store all this information in a text file using File Handling?
I thought about looping through each element in the array and then converting all the fields into Strings but that seems wrong.