There's at least two things wrong with that code.
You redeclare the name 'fruit' in two different local scopes, neither of which has anything to do with the member variable named 'fruit'. The member 'fruit' will never change from the empty array it was initialized to. Possibly you just mean 'fruit = ...' rather than 'String[] fruit = ...'.
You set local variable 'time = 0' at the top of the draw() method, and there's nothing to change it. Therefore at the point you test whether it's 0 or 1, it's always 0.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…