Let's say we have car management software and codes are,
if (power== "gasoline")
{
// many code
}
else if (power== "diesel")
{
// many code
}
else if (power== "electric")
{
// many code
}
else if (power== "hybrid")
{
// many code
}
As title of this question, I don't want the code of 'diesel', 'electric', 'hybrid' to be loaded into memory to improve performance when a user selects 'gasoline'.
Is there a excellent way for this case ?
Thank you !
Aucun commentaire:
Enregistrer un commentaire