2017-12-09 1 views
-5
SolucionMochila sm = null ; 

ArrayList<Integer> nombre = new ArrayList<Integer>(); 



sm.setSolucion(nombre); 
sm.setSumaPesos(0); 
sm.setSumaValores(0); 

をアクセスも?エラーNULLポインタがSMがある

SolucionMochila sm = null 

オブジェクトを作成します:私は私がすべての変数

+1

可能な複製を、どのように私はそれを修正します?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) –

答えて

2

のではなく、定義したので、理由を知らないNullPointerExceptionがある何[の

SolucionMochila sm = new SolucionMochila(); 
関連する問題