1

question to Java Devs 😂😂😂

Comments
  • 1
    I get 12 when I do it in my head, but now I wanna run this real quick to see if this is some kind of trick question I haven't seen before
  • 0
    12 in head
  • 0
    12 at first execution in head...really wants to check through javac
  • 2
    12. Just checked by excecution- the syntax is crazy weird though...
  • 0
    twelve, right? the jvm in my head fails from time to time tho...
  • 4
    12. Either this is homework or an interview question... Because if you see this in real code, you need to maim whomever wrote it.
  • 0
    I think it's 12 because of the pre-increment(I don't know if that's how to say it in English), it increments i and then compares it with 5, so on the first iteration i will be 3, so f will be 3, and on the next, i will be 4, making f to equal 12
  • 0
Add Comment