Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

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
Comments
Sandeep Mewara 6-Nov-12 17:04pm    
Not clear. Please rephrase/elaborate.
Sergey Alexandrovich Kryukov 6-Nov-12 17:42pm    
List by what? Another application? Written if what language? Do you have this Java file on input or what? And, most important, why?
--SA
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

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.
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900