Since its java, how about iterate through the array of objects?
You set those values you are asking about each student with an instance of the class Student. That's the part you are not doing in the code above.
hindi ko alam kung anong tanong mo jan sir. pero at a glance, there is something wrong with your code. pero yun nga, your question is vague and unclear.
Since its java, how about iterate through the array of objects?
You set those values you are asking about each student with an instance of the class Student. That's the part you are not doing in the code above.
hindi ko alam kung anong tanong mo jan sir. pero at a glance, there is something wrong with your code. pero yun nga, your question is vague and unclear.
Di ko ma gets sir. Array is different entity into Classes. Array is a Data Structure used to store data of the same data types. while on the other hand, Class is an Object itself. it may consists some members like variables, methods, properties, etc. Classes can have array inside as its member. So yung tanong mong paano e array yung class? parang ang gulo po.
kasi based sa image ng code mo sa taas, yung ininput mo sa variable mo na xx is pinarse mo sya as int tapos nilagay mo sya sa variable mo na x tapos ginawa mo syang dynamic na array element length sa arrStudent mo na variable(which is an array) then sa baba na code parang gusto mong maglagay ng data sa bawat array element nung arrStudent mo na array. pero at the same time parang napansin ko din na parang gusto mong mag instantiate ng Student class mo as arrStudent which is I think hindi possible(as far as I know in Java).
to make an instance of the Student Class, it should be something like: Student stud = new Student();
I think ang gusto niya mangyare is mag generate ng madaming classes based dun sa different iteration which is not gonna work. Array can only hold data structure types like int, double, String, Object, etc etc. Class can't be made, unless it is Interface like JProgressBar, JButton etc.
I think ang gusto niya mangyare is mag generate ng madaming classes based dun sa different iteration which is not gonna work. Array can only hold data structure types like int, double, String, Object, etc etc. Class can't be made, unless it is Interface like JProgressBar, JButton etc.
to generate ng maraming classes of the same based class? for what po kaya when you can always instantiate naman a class to different areas within the same namespace. kung naman gusto nya mag extend ng class he can always use partial classes without direct modification of the actual based class. di ko lang talaga ma gets pero syempre lahat tayo dumaan sa confusion so I assume na di nya lan ma express yung gusto nyang sabihin at paliwanag.
Thabk you po sa lahat nag reply. I knew the answer, di dapat tlga yun e array hehehe isang statement para sa lahat sa e store kung anumang input, d kailangan ng lima hehehe