Variables (and data) are THE big differences between C++, and Java, for non-primitive types at least.
If you know C++, a book a bout Java is probably not worth buying.
Java is an order of magnitude simpler than C++.
You can use the official documentation
https://docs.oracle.com/javase/tutorial/ which I found quite nice. Don't read everything, read the table of contents and
https://docs.oracle.com/javase , and just look things up when needed (Java library is HUGE).
Some highlights you may want to study at first.
- Variables of non-primitive types (ie classes and Boolean, Integer, Double, and a few other boxes), in particular the fact that everything is a reference.
- arrays (not used often, but useful)
- Standard containers (list, set, map), and String.
- IO library (you generally need to create 3-5 objects to open a file). "io" is old, there is also "nio" (new io). I still fail to remember any of this stuff.
- Interfaces
- Generics, which are a bit like templates, but not really.