File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exam Lab Question doubt

 
Abhishek KumarSoni
Ranch Hand
Posts: 61
Chrome Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello friends Here line number is showing expected output which is 828 .But friend why output in line number 11 is ceene-abhi .It should follow rule followed in line number 10 and output should be -abhiceene().I mean -abhi should be calculated first thrn ceene should be added in it.
 
Heena Agarwal
Ranch Hand
Posts: 262
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it change the output if the order of computation was not what you think it is? Whatever is in left will stay in left. Right?

Edit : --n is 1. So that expression becomes -
str[1] = str[1] + "-" + "abhi"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic