title: difference of two columns in spark dataframe using java
body: <p>I tried the options mentioned in the following post but it didn't work in java - <a href="https://stackoverflow.com/questions/43917836/finding-the-difference-of-two-columns-in-spark-dataframes-and-appending-to-a-new?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">finding the difference of two columns in spark dataframes and appending to a new column</a></p>
  
  <p><a href="https://stackoverflow.com/questions/46334705/subtract-two-columns-with-null-in-spark-dataframe?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">subtract two columns with null in spark dataframe</a></p>
  
  <p>Please let me know how can I find difference between two column of a dataset using Spark in Java.</p>