+ sign is used to concatenate values of variables with the string e.g. in your if id variable has value 3 then it would be concatenated as "Employee id:3"
Why we are putting + sign in the start of variable and sometimes at both ends of the variable?View more random threads:
- VARIABLE STRUCTURE in java 2011
- Java forum for usa students 2011 for helping
- native code in java
- Getting the element of a vector in Java 2011
- Java API classes. And java bytecodes,differnce in machine...
- New development in java 2011
- Error inJava has discovered application components that...
- Java APIs like Speech API, Media and robotics
- Serialization in java
- what is difference between PhP and java
For example:
Sponsored Links
System.out.println("Employee id:" +id+ "Name:" +name);
+ sign is used to concatenate values of variables with the string e.g. in your if id variable has value 3 then it would be concatenated as "Employee id:3"
There are currently 1 users browsing this thread. (0 members and 1 guests)