Language: Java

import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());
            int d = Integer.parseInt(sc.next());

            if(isSeven(a, b, c, d)){
                StringBuilder sb = new StringBuilder();
                sb.append(a);
                sb.append("+").append("b");
                sb.append("+").append("c");
                sb.append("+").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, b, c, -d)){
                sb.append(a);
                sb.append("+").append("b");
                sb.append("+").append("c");
                sb.append("-").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, b, -c, d)){
                sb.append(a);
                sb.append("+").append("b");
                sb.append("-").append("c");
                sb.append("+").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, -b, c, d)){
                sb.append(a);
                sb.append("-").append("b");
                sb.append("+").append("c");
                sb.append("+").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, -b, c, -d)){
                sb.append(a);
                sb.append("-").append("b");
                sb.append("+").append("c");
                sb.append("-").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, -b, -c, d)){
                sb.append(a);
                sb.append("-").append("b");
                sb.append("-").append("c");
                sb.append("+").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, b, -c, -d)){
                sb.append(a);
                sb.append("+").append("b");
                sb.append("-").append("c");
                sb.append("-").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            } else if(isSeven(a, -b, -c, -d)){
                sb.append(a);
                sb.append("-").append("b");
                sb.append("-").append("c");
                sb.append("-").append("d");
                sb.append("=").append("7");
                
                System.out.println(sb.toString());
            }
            

        }catch(Exception e){
            e.printStackTrace();
        }        
    }

    private static boolean isSeven(int a, int b, int c, int d){
        if(a+b+c+d == 7) return true;
        else return false;
    }
}

Compiler output:
Main.java:23: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:24: error: cannot find symbol
                sb.append("+").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:25: error: cannot find symbol
                sb.append("+").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:26: error: cannot find symbol
                sb.append("-").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:27: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:29: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:31: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:32: error: cannot find symbol
                sb.append("+").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:33: error: cannot find symbol
                sb.append("-").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:34: error: cannot find symbol
                sb.append("+").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:35: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:37: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:39: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:40: error: cannot find symbol
                sb.append("-").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:41: error: cannot find symbol
                sb.append("+").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:42: error: cannot find symbol
                sb.append("+").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:43: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:45: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:47: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:48: error: cannot find symbol
                sb.append("-").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:49: error: cannot find symbol
                sb.append("+").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:50: error: cannot find symbol
                sb.append("-").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:51: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:53: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:55: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:56: error: cannot find symbol
                sb.append("-").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:57: error: cannot find symbol
                sb.append("-").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:58: error: cannot find symbol
                sb.append("+").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:59: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:61: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:63: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:64: error: cannot find symbol
                sb.append("+").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:65: error: cannot find symbol
                sb.append("-").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:66: error: cannot find symbol
                sb.append("-").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:67: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:69: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
Main.java:71: error: cannot find symbol
                sb.append(a);
                ^
  symbol:   variable sb
  location: class Main
Main.java:72: error: cannot find symbol
                sb.append("-").append("b");
                ^
  symbol:   variable sb
  location: class Main
Main.java:73: error: cannot find symbol
                sb.append("-").append("c");
                ^
  symbol:   variable sb
  location: class Main
Main.java:74: error: cannot find symbol
                sb.append("-").append("d");
                ^
  symbol:   variable sb
  location: class Main
Main.java:75: error: cannot find symbol
                sb.append("=").append("7");
                ^
  symbol:   variable sb
  location: class Main
Main.java:77: error: cannot find symbol
                System.out.println(sb.toString());
                                   ^
  symbol:   variable sb
  location: class Main
42 errors