Skip to content
CodeKruPro

Numbers and strings joined with +

Predict the outputEasyJava onlyAsked in: Infosys, PhonePe, Wipro
Main.java
public class Main {
    public static void main(String[] args) {
        System.out.println(1 + 2 + "3" + 4 + 5);
        System.out.println("3" + (4 + 5));
        System.out.println(1 + 2 + "");
    }
}

Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.

to answer and keep your progress. Reading is free for everyone.