0

Is it possible to add any variable to front of some string or Integer?

16th Aug 2016, 9:56 AM
Arunkumar
2 Answers
+ 2
What do you mean add a variable in front of a string. If you want to add a variable and a string you may concatenate them with the + operator. Simply put a + sign between them. For example, System.out.println("Jerry" + 6); will output: Jerry6
16th Aug 2016, 2:06 PM
Divjot Bedi
+ 1
jerry is a string and 6 is a int type. so actually both are datatype and variables are used to store their values. so variables hold the datatypes.
16th Aug 2016, 4:51 PM
rajat kumar raicha
rajat kumar raicha - avatar