File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exam Lab Question doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exam Lab Question doubt" Watch "Exam Lab Question doubt" New topic

Exam Lab Question doubt

Abhishek KumarSoni
Ranch Hand

Joined: Nov 05, 2013
Posts: 61

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

Joined: Dec 25, 2013
Posts: 262
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"
I agree. Here's the link:
subject: Exam Lab Question doubt
It's not a secret anymore!