Java - Deprecated method - What to do?

后端 未结 3 1711
悲哀的现实
悲哀的现实 2021-01-06 09:25

I am following a series of Java tutorials in an attempt to learn it. I have a question about tutorial 72.

Link: http://www.youtube.com/watch?v=9z_8yEv7nIc&featur

3条回答
  •  悲&欢浪女
    2021-01-06 09:51

    I looked at the tutorial in question.

    For your question about API, you would need to do the following:

    rightList.setListData(leftList.getSelectedValuesList().toArray());
    

    PS: some tips about style. In Java, variables usually begin with a lowercase alphabet and class names begin with an uppercase alphabet. In your code above, it looked to me that you were trying to call a static method on a class, so you might want to change the names to lowercase.

提交回复
热议问题