Possible lossy conversion from double to int

后端 未结 3 935
孤城傲影
孤城傲影 2020-12-21 03:06

Why am I getting the Possible lossy conversion from double to int error and how can I fix it?

public class BinSearch {
    public static void ma         


        
3条回答
  •  Happy的楠姐
    2020-12-21 03:46

    The array / loop indexes should be ints, not doubles.

    When attempting to access set[j] for example, it complains about treating j as an int.

提交回复
热议问题