aspose file tools*
The moose likes Beginning Java and the fly likes i'm new in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "i Watch "i New topic
Author

i'm new in java

hyuuga badita
Greenhorn

Joined: Mar 05, 2010
Posts: 6
i want to know how to token the operand and operator in java. my idea is to use the 'if' statement to detect the statement start with /* or endwith *// or //. can you teach me how to write the appropriate code about how to put condition in token ?? .. it will my pleasure if you give me a suggestion. i will love to learn it from you.. anyway thank you...
Geoff Jefferson
Ranch Hand

Joined: Apr 09, 2009
Posts: 102
Usually /* and // and */ are used for commenting.

An operation is an action performed on one or more values either to modify the value held by one or both of the values, or to produce a new value by combining existing values. Therefore, an operation is performed using at least one symbol and at least one value. The symbol used in an operation is called an operator. A value involved in an operation is called an operand.

http://www.functionx.com/java/Lesson03.htm

Maybe you should look at the API String Tokenizer class

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14430
    
  23

Badrul welcome to JavaRanch. Please UseAMeaningfulSubjectLine when you start a new topic.

Can you explain the context of your question - are you trying to write a program that parses Java source code? What do you want to do exactly, find out where the comments are in a Java source file?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i'm new in java