Concatenation – Conversion

We know earlier, the + operator is implicitly overloaded in Java – works for addition and concatenation. For concatenation, String class includes concat() method. That is, strings can be concatenated both with + operator an concat() method. Following program illustrates. public class Concat { public static void main(String args[]) { String s1 = “to”; String …

Concatenation – Conversion Read More »