mardi 5 octobre 2021

can someone explain the meaning behind this [duplicate]

public class Self {

public static void main(String [] args) {

String Hobby; //Personal Hobby boolean isHappy; //Is self happy? Either true or false

Hobby = "Gym"; //New Hobby Found, the Gym!

int Hours; //Hours of training and hard work int days; //Days of consistency

if(Hobby == "Gym") //if the gym is still a hobby {

while(isHappy == true) //Going because one's self is happy {

days++; //Add another day to the record

Hours += Hours; //Add hours of time working out

}

}

else if (Hobby != "Gym") //if one's self is going but not because it is a hobby anymore {

boolean selfConscious; //is one self conscious?

int weight;

int desiredAmount; //not achievable

boolean bodyDysmorphia; //does one have body dysmorphia?

while (weight != desiredAmount) // !=, means does not equal {

isHappy = false; //not satisfied

selfConscious == true; //is self conscious

bodyDysmorphia == true; //has body dysmorphia

}

}

else //the conditions one truly strives for {

isHappy = true;

bodyDysmorphia = false;

selfConscious = false;

}

}

}

//I tried this for help as well.

Aucun commentaire:

Enregistrer un commentaire