Language: Java

		StringBuilder sb = new StringBuilder();
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int y = in.nextInt();
		int tx = in.nextInt();
		int ty = in.nextInt();
		in.close();
		
		int dx = tx - x;
		int dy = ty - y;
		
		for (int i = 0; i < dx; i++) {
			sb.append("R");
		}
		for (int i = 0; i < dy; i++) {
			sb.append("U");
		}
		for (int i = 0; i < dx; i++) {
			sb.append("L");
		}
		for (int i = 0; i <= dy; i++) {
			sb.append("D");
		}
		for (int i = 0; i <= dx; i++) {
			sb.append("R");
		}
		for (int i = 0; i <= dy; i++) {
			sb.append("U");
		}
		sb.append("L");
		sb.append("U");
		for (int i = 0; i <= dx; i++) {
			sb.append("L");
		}
		for (int i = 0; i <= dy; i++) {
			sb.append("U");
		}
		sb.append("L");
		System.out.println(sb.toString());
	}

}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
		StringBuilder sb = new StringBuilder();
		^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
		in.close();
		^
Main.java:12: error: class, interface, enum, or record expected
		for (int i = 0; i < dx; i++) {
		^
Main.java:12: error: class, interface, enum, or record expected
		for (int i = 0; i < dx; i++) {
		                ^
Main.java:12: error: class, interface, enum, or record expected
		for (int i = 0; i < dx; i++) {
		                        ^
Main.java:14: error: class, interface, enum, or record expected
		}
		^
Main.java:15: error: class, interface, enum, or record expected
		for (int i = 0; i < dy; i++) {
		                ^
Main.java:15: error: class, interface, enum, or record expected
		for (int i = 0; i < dy; i++) {
		                        ^
Main.java:17: error: class, interface, enum, or record expected
		}
		^
Main.java:18: error: class, interface, enum, or record expected
		for (int i = 0; i < dx; i++) {
		                ^
Main.java:18: error: class, interface, enum, or record expected
		for (int i = 0; i < dx; i++) {
		                        ^
Main.java:20: error: class, interface, enum, or record expected
		}
		^
Main.java:21: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                ^
Main.java:21: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                         ^
Main.java:23: error: class, interface, enum, or record expected
		}
		^
Main.java:24: error: class, interface, enum, or record expected
		for (int i = 0; i <= dx; i++) {
		                ^
Main.java:24: error: class, interface, enum, or record expected
		for (int i = 0; i <= dx; i++) {
		                         ^
Main.java:26: error: class, interface, enum, or record expected
		}
		^
Main.java:27: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                ^
Main.java:27: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                         ^
Main.java:29: error: class, interface, enum, or record expected
		}
		^
Main.java:31: error: class, interface, enum, or record expected
		sb.append("U");
		^
Main.java:32: error: class, interface, enum, or record expected
		for (int i = 0; i <= dx; i++) {
		^
Main.java:32: error: class, interface, enum, or record expected
		for (int i = 0; i <= dx; i++) {
		                ^
Main.java:32: error: class, interface, enum, or record expected
		for (int i = 0; i <= dx; i++) {
		                         ^
Main.java:34: error: class, interface, enum, or record expected
		}
		^
Main.java:35: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                ^
Main.java:35: error: class, interface, enum, or record expected
		for (int i = 0; i <= dy; i++) {
		                         ^
Main.java:37: error: class, interface, enum, or record expected
		}
		^
Main.java:39: error: class, interface, enum, or record expected
		System.out.println(sb.toString());
		^
Main.java:40: error: class, interface, enum, or record expected
	}
	^
31 errors