Array of Sockets Java

前端 未结 4 757
心在旅途
心在旅途 2021-01-15 13:37

I\'m creating server and client java applications. I would like to create an array to store my sockets in. I\'m using eclipse, and when I type in this line:

         


        
4条回答
  •  天命终不由人
    2021-01-15 14:23

    While Socket class itself implements AutoCloseable interface, array of Sockets - does not.

    To put it in simple terms: you cannot open or close an array.

提交回复
热议问题