Click here to Skip to main content
13,141,637 members (51,749 online)
Rate this:
Please Sign up or sign in to vote.
See more:

is there a way to list a class's loops (for, while and switch)?
I think like there are 3 fors, 2 whiles, on a Jlist:
1. for
2. for
3. for
1. while
2. while
Posted 6-Nov-12 10:24am
Sandeep Mewara 6-Nov-12 17:04pm
Not clear. Please rephrase/elaborate.
List by what? Another application? Written if what language? Do you have this Java file on input or what? And, most important, why?
AllainLG 6-Nov-12 18:05pm
My program would work like this: the user chooses a file (text or java) and I'd like to get how many loops it have, and list them on my jList.
I want to change for example a for loop to a while, so it will work the same way.
Of course evereything in java language.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

related to: How to get the input file's class without knowing it (java)[^]

At this point you need to get into working with Strings / pure text.
That's native code inside a method, there is no way to get that by function.
AllainLG 7-Nov-12 12:30pm
I see, thank you.
Does someone have a code for this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 7 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100