Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Thanked 0 Times in 0 Posts

    the dollar sign "$", prints like any other normal char in java like "a" or "*" ?

    the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
    Can you tell me a tutorial with exercises about java me ?

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    You mean like in a println call? Yeah I believe it does. Actually... I seem to recall that you can actually use the $ in a variable as well in Java, but its not recommended practice (especially now that it would like a lot like PHP objects).
    Don't quote me on that, but I believe that yes it will print normally without needing escaping, and that it can be used in a variable name.
    Just give it a try, worst comes to worst you'll need to escape it.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  3. #3
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Thanked 163 Times in 160 Posts
    right on all points...$ is not a special character in java (except in the context of regular expressions)
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts