Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why we are putting + sign in the start of variable and sometimes both ends variable
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Why we are putting + sign in the start of variable and sometimes at both ends of the variable?

For example:

System.out.println("Employee id:" +id+ "Name:" +name);
Reply
#2
+ 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"

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to start JavaDb(Derby) server from Java application 2011 Vuhelper 0 2,709 06-04-2011, 10:38 PM
Last Post: Vuhelper
  VARIABLE STRUCTURE in java 2011 saneha 0 1,044 04-27-2011, 06:24 AM
Last Post: saneha

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support