maybe this question little bit easy, but I don't get any idea why we need an empty constructor to passing a data from Firebase. Here is an example for the code:
public class Hero{
String Name, Weapon, Description, Price, Discount, Id;
public Hero() {
}
public Hero(String name, String weapon, String description, String price, String discount, String id) {
Name = name;
Weapon= weapon;
Description = description;
Price= price;
Discount = discount;
Id= id;
}}
then we need a getter and setter for each Menu..
But whats make dizzy is, Why we need an empty Constructor? Is that really necessary?
Can we just make a class without typing an empty constructor? is this will be the same result?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…