Java if/else behaving strangely

后端 未结 4 787
日久生厌
日久生厌 2021-01-26 18:50

I\'m a real newbie to java, so please excuse me if this is a hopelessly straightforward problem.

I have the following from my java game server:

// Get in         


        
4条回答
  •  误落风尘
    2021-01-26 19:44

    It would seem highly unlikely that the else is not executing. Are you sure your loop does not exit on such packets and hence your conditions do not even run? Does your System.out.println("Received "+line); print anything for the packet that seems to be missing the else statement?

提交回复
热议问题