Categories
Mastering Development

How to move the data that I have called from the Firebase real-time database, in a listview to another activity in android studio?

So, I have a simple listview application. When I click an item, it will send the data to the next activity using Bundle. In the first time, I use this JSON structure "teacher": [ { "name": "Carl", "age": "40" }, { "name": "Johnson", "age": "44" } ], And this is my Java code: Query query […]

Categories
Development

I have array of objects, My goal is to print age of objects in ascending order using forEach only

I have Array in the name of students in that array I have four different objects. Now I have to print those objects, but the age should be in ascending order and I have to do this only by using forEach only. var students = [{ name: ‘Mark’, age: 28 }, { name: ‘Johnson’, age: […]