Frage

This works fine:

TreeMap <String, ArrayList> x_probs_org = new TreeMap<String, ArrayList>();

But this:

TreeMap <String, TreeMap<String, Float>> x_probs = new <String, TreeMap<String, Float>>();

causes the following error:

error: <identifier> expected

Why? What am I doing wrong? I tried a couple of other ways but I don't see why this is wrong.

War es hilfreich?

Lösung

You forgot the TreeMap identifier:

.... = new TreeMap<String, TreeMap<String, Float>>();

Andere Tipps

try it like that:

TreeMap <String, TreeMap<String, Float>> x_probs = new TreeMap<String, TreeMap<String, Float>>();
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top