File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

i'm new in java

hyuuga badita

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.

Maybe you should look at the API String Tokenizer class

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15081

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:
subject: i'm new in java
It's not a secret anymore!