“Variable may not have been initialized”

前端 未结 4 652
陌清茗
陌清茗 2020-12-22 02:42

I\'ve got a method that creates a String and another method that changes Strings

void create(){
    String s;
    edit(s);
    System.out.printl         


        
4条回答
  •  抹茶落季
    2020-12-22 03:21

    Give your variable S a value or as Jeroen Vanneve said "Change it to String s = null;"

提交回复
热议问题