Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2005, 12:41 PM   PM User | #1
ttttt
Regular Coder

 
ttttt's Avatar
 
Join Date: Oct 2005
Posts: 372
Thanks: 0
Thanked 0 Times in 0 Posts
ttttt is an unknown quantity at this point
Smile Quick Question About Java Comments

You know on code for web pages and script, you often see something like this
Code:
*/My comment about the script/*
Well.....Is it possible to do this with Java?
Thanks
__________________
ttttt
http://openoffice.org/- Microsoft Office without the Microsoft.
[home page][forum]
Versatile, free software
ttttt is offline   Reply With Quote
Old 10-25-2005, 12:50 PM   PM User | #2
Roelf
Senior Coder

 
Join Date: Jun 2002
Location: Zwolle, The Netherlands
Posts: 1,110
Thanks: 2
Thanked 28 Times in 28 Posts
Roelf is on a distinguished road
// one line comment


/*

block comment

*/
Roelf is offline   Reply With Quote
Old 10-25-2005, 02:24 PM   PM User | #3
TheShaner
Senior Coder

 
TheShaner's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 1,125
Thanks: 2
Thanked 40 Times in 40 Posts
TheShaner will become famous soon enoughTheShaner will become famous soon enough
Various programming languages use different ways of commenting, so just be careful what language you're in.

Java (and JavaScript follows the same method, which is why you've seen it in scripts) and C++:

Code:
// Only this line is a comment
 
/*
  Whatever's between the two is a comment
*/
HTML:

Code:
<!-- This is a comment -->
CSS:

Code:
/* This is a comment */
VBScript:

Code:
' This is a comment
ColdFusion:

Code:
<!--- This is a comment --->
Perl:
Code:
# This is a comment
C:
Code:
// This is a comment
... and the list goes on.

-Shane

Last edited by TheShaner; 10-25-2005 at 02:27 PM..
TheShaner is offline   Reply With Quote
Old 10-25-2005, 03:06 PM   PM User | #4
ttttt
Regular Coder

 
ttttt's Avatar
 
Join Date: Oct 2005
Posts: 372
Thanks: 0
Thanked 0 Times in 0 Posts
ttttt is an unknown quantity at this point
Thanks that told me everything I need to know.
Thanks Again
__________________
ttttt
http://openoffice.org/- Microsoft Office without the Microsoft.
[home page][forum]
Versatile, free software
ttttt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:42 PM.


Advertisement
Log in to turn off these ads.