Java program to implement the above approach
import java . util . * ; class GFG { static boolean isSubsetSum ( int arr [ ] , int n , int sum ) { boolean [ ] [ ] subset = new boolean [ n + 1 ] [ sum + 1 ] ;