LeetCode 76: Minimum Window Substring - Java
I have some suggestions.
Extract some of the logic to methods.
In your code, I see at least three sections of code that could be in methods. In my opinion, those extraction will help with the reading and make the code a bit shorter.

The validation of the parameters.

Before
if (string == null || target == null || string.length() == 0 || target.length() == 0 || string.length() &lt; target.length()) {
   return &quot;&quot;;
}

After
public String minWindow(String string, String target) {
   //[...]
   if (haveInvalidParameters(string, target)) {
      return &quot;&quot;;
   }
   //[...]
}

private boolean haveInvalidParameters(String string, String target) {
   return string == null || target == null || string.length() == 0 || target.length() == 0 || string.length() &lt; target.length();
}


The map initialization.

Before
//[...]
Map&lt;Character, Integer&gt; map = new HashMap&lt;&gt;(targetLength);
for (char character : target.toCharArray()) {
   map.put(character, -~map.getOrDefault(character, 0));
}
//[...]

After
public String minWindow(String string, String target) {
   //[...]
   Map&lt;Character, Integer&gt; map = initializeMap(target, targetLength);
   //[...]
}

private Map&lt;Character, Integer&gt; initializeMap(String target, int targetLength) {
   Map&lt;Character, Integer&gt; map = new HashMap&lt;&gt;(targetLength);
   for (char character : target.toCharArray()) {
      map.put(character, -~map.getOrDefault(character, 0));
   }
   return map;
}


The substring section.

Before
public String minWindow(String string, String target) {
   //[...]
   return flag == true ? string.substring(minLeft, -~minRight) : &quot;&quot;;
}

After
public String minWindow(String string, String target) {
   //[...]
   return applySubstring(string, minLeft, minRight, flag);
}

private String applySubstring(String string, int minLeft, int minRight, boolean flag) {
   return flag == true ? string.substring(minLeft, -~minRight) : &quot;&quot;;
}

Try to keep the variable declarations at the top of the blocks.
Generally in Java, we try to put the variable declarations at the top of the blocks.

Code Conventions for the Java (Revised April 20, 1999)

Before
int left = 0, right = 0;

After
int minLeft = 0, minRight = 0, min = string.length();
int left = 0, right = 0;

You can simplify the boolean expression
return flag == true ? string.substring(minLeft, -~minRight) : &quot;&quot;;

is equals to
return flag ? string.substring(minLeft, -~minRight) : &quot;&quot;;