I have been struggling with my while loop and was wondering if you guys can see the fault in my logic.
The concept of the project
Creating a machine that will permanently loop through a bunch of code for the rest of its existence. Basically I am making an automatic cat feeder that will dispense food at certain times during the day. THAT IS WHY THE LOOP MUST BE PERMANENT.
Here is my basic code so far:
DateFormat dateFormat = new SimpleDateFormat("HH:mm"); // 1.
Calendar cal = Calendar.getInstance(); // 2.
String CurrentTime = dateFormat.format(cal.getTime()); // 3.
jTextArea2.setText(CurrentTime);
String FeedTimeMorning = "06:00";
String FeedTimeSnack = "19:07";
String FeedTimeMidday = "12:30";
boolean TempFeed = false;
while(TempFeed=false)
{
if (FeedTimeMorning.equals(CurrentTime)) { txaOne.setText("FeedCats"+" " +CurrentTime);}
if (FeedTimeSnack.equals(CurrentTime)){txaOne.setText("FeedCats"+" " +CurrentTime);}
if(FeedTimeMidday.equals(CurrentTime)){txaOne.setText("FeedCats"+" " +CurrentTime);}
When it comes to the designated time the text "Feed Cats " does not appear.
Any help would be appreciated.