Seconds to Minutes conversion

Question:
Can someone inform me of how to fix this? I keep getting the same error, saying “Duplicate in local variable (“Days”, “Hours”, and “Minutes”)”, but I don’t know how to fix it in a way that’d work.
Repl link:
https://replit.com/@gosst0781/M4HW2#M4HW2.java

    if (seconds >= DAY); 
      set days = seconds / DAY; 
    if (seconds >= HOUR); 
      set hours = seconds / HOUR; 
    if (seconds >= MINUTE); 
      set minutes = seconds / MINUTE; 
    set SECOND = seconds % MINUTE;

affected code in question: ^

that code looks somewhat like SQL. If you’re new to programming, do ensure that you’re using a step-by-step tutorial. Sketch App is currently the only Java tutorial listed on replit. Otherwise, see Java for Programmers: Basic Syntax in Java Cheatsheet | Codecademy

1 Like