File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i'm new in java

 
hyuuga badita
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic