First of all you are mixing the types which leeds you to missunderstanding.
int - responsible for storing whole numbers like 1, 2, 5
double - responsible for storing comma separated vales like 1.5, 6.3, 5.321
String - responsible for alphanumeric signs so it can store anything "Table", "2" (NOTE if im using "" it means that this is meant to be a String)
So going through your code the output of the code line by line is:
int a = 10;
int b = 15;
int c = b + 38; // OUTPUT 53
//int d = a + 12;
//double e = 12.3;
String s = "s" + a; // OUTPUT s10 COMMENT You are adding String "s" to int a so a become String with value of "10"
String s1 = a + "b"; // OUTPUT 10b COMMENT same story here a become String with value "10" and we are adding string "b"
//String s2 = "a";
String s3 = s1 + "a"; // OUTPUT 10ba COMMENT s1 is now "10b" and you are adding "a"
String s4 = s3 + "b"; // OUTPUT 10bab COMMENT s3 is now "10ba" and you are adding "b"
System.out.println(c + s4 + s); // OUTPUT 5310babs10 COMMENT c becomes String with value "53" adding s4 = "10ba" adding String s = "s10"
To achieve your expectations 10151015 the code should look like this
int a = 10;
int b = 15;
int c = b + 38; // OUTPUT 53
String s1 = String.valueOf(a) + String.valueOf(b); // OUTPUT 1015
String s3 = s1 + String.valueOf(a); // OUTPUT 101510
String s4 = s3 + String.valueOf(b); // OUTPUT 10151015
I wasn't running that code but I hope you understand your wrong understanding :D
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…