The moose likes Beginning Java and the fly likes Value of Expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Value of Expression" Watch "Value of Expression" New topic

Value of Expression

Roger Sanchez

Joined: Jun 23, 2003
Posts: 16
Another sample exam question I need help with:
If variable s have declared by the statement String s = new String ("Hello World"); then what is the value of the expression s.substring(0,4)+s.charAt(5)+Character.toUpperCase(s.charAt(4))+s.substring(5)

Joe Pluta
Ranch Hand

Joined: Jun 23, 2003
Posts: 1376
Originally posted by Roger Sanchez:
Another sample exam question I need help with:

Okay, you need help. What part do you need help with? Show us your work so far on the question.
Paul Zill

Joined: Jun 12, 2003
Posts: 28
Is there a particular part of the question you find confusing?
Have you tried running it yourself to reverse engineer the question?
I agree. Here's the link:
subject: Value of Expression
It's not a secret anymore!