how to split string with dolor sign in java

Java
String line = ...
String[] lineData = line.split("\\$");
Source

Also in Java: