Results 1 to 5 of 5
Thread: Help
- 11-20-2010, 01:23 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
Help
I Ask any members can help me to write this program in java
details:
1- reading text file
2- gives line number
3- the program give you all the variables ( int or double or char or string) found in this line number and give in any method they are found.
example
text
1- public class Test{
2- public int Summation(){
3- int x=1; int y=3; int sum;
4- sum=x+y;
5- }
6- System.out.println(sum);
7- public static void main(String[] args) {
8- summation();
9- }
10- }
now you give the program line number= 3
the program give you
int x summation()
int y summation ()
int sum summation ()Last edited by Fubarable; 11-20-2010 at 02:12 PM. Reason: Moderator edit: email deleted
- 11-20-2010, 01:28 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
You want a Java source code parser; if you click the home (index.html) page of the API documentation you'll see a big block listing all of the SE technologies; the second block on the second row reads 'javac'; click it and you'll see the complete API documentation for the javac compiler. Start reading it and implement your own processor after the text has been parsed.
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
- 11-20-2010, 01:38 PM #3
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
mr JosAH i need a java program to do this.
- 11-20-2010, 02:06 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Build a wall around Donald Trump; I'll pay for it.
-
email deleted in initial post. Poster: please don't post your email address as all communications in this forum should be public. Also, if you need a Java program to do something, then by all means, please feel free to write this, and if you need help with your program, then please show us your code and ask your question and we'll be more than happy to help you, but please don't demand one be given you as that's not what this forum is for.
Bookmarks