File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 13875
    
  10

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 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: i'm new in java
 
Similar Threads
How to parse a string with "|" and empty strings
String Tokenizer
Help with HQL Insert and Joins using Hibernate 3 / JPA
How Can i filter the tokens
Synchronization Token