By definition if the upper integral equals the lower integral, then $ f $ is Riemann integrable.
An example of a Riemann integrable function is $ f(x)=0 $ if $ x\in(0,1] $ and $ f(x)=1 $ if $ x=0 $.
But then why is the function defined by $ f(x)=0 $ if $ x\in(0,1) $ and $ f(x)=1 $ if $ x=0,1 $ not Riemann integrable?