前提・実現したいこと
デバッグで空のArrayListに値を入れたいのですがエラーが表示されます。
データ型がimportしているDto型だからなのでしょうか?
###コード
Java
1List<TestDto> test = new ArrayList<>(); 2 3test = null; 4 5System.out.println(test);//ここにブレークポイントを置く
試したこと(値の変更)
-
new ArrayList<TestDto>(Arrays.asList("1"))
-
List<TestDto> debug = new ArrayList<>();
TestDto testDto = new TestDto;
debug.add(testDto);
発生している問題・エラーメッセージ
ArrayListは型に解決できません。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/16 11:45