Computer Applications
What is concatenation? On which data type is concatenation performed?
Java Operators
31 Likes
Answer
Concatenation means joining two strings together. It is performed on String data type.
Answered By
19 Likes
Related Questions
Determine the output of the following program.
public class Test { public static void main(String[] args) { int a = 1, b = 2; System.out.println("Output1: " + a + b); System.out.println("Output2: " + (a + b)); } }
Determine the output of the following program.
public class PredictOutput2 { public static void main(String args[]) { int a = 6, b = 2, c = 3; System.out.println("Output 1: " + (a == b * c)); System.out.println("Output 2: " + (a == (b * c))); } }
What is the difference between the following two statements in terms of execution? Explain the results.
x -= 5;
x =- 5;Determine the output of the following program.
public class PredictOutput1 { public static void main(String args[]) { int a = 4, b = 2, c = 3; System.out.println("Output 1: " + (a = b * c)); System.out.println("Output 2: " + (a = (b * c))); } }