Is it possible to use struct-like constructs in Java?

前端 未结 8 1981
时光取名叫无心
时光取名叫无心 2020-12-30 11:15

I\'m considering using Java for a large project but I haven\'t been able to find anything that remotely represented structures in Java. I need to be able to convert network

8条回答
  •  太阳男子
    2020-12-30 11:58

    No, this is not possible. You're trying to use Java like C, which is bound to cause complications. Either learn to do things the Java way, or go back to C.

    In this case, the Java way would probably involve DataInputStream and/or DataOutputStream.

提交回复
热议问题