Click here to Skip to main content
11,705,473 members (55,051 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java list

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 at 6-Nov-12 17:04pm
Not clear. Please rephrase/elaborate.
Sergey Alexandrovich Kryukov at 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?
AllainLG at 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 at 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
0 Sergey Alexandrovich Kryukov 286
1 OriginalGriff 269
2 ppolymorphe 78
3 Inimicos 60
4 ProgramFOX 50
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626

Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 7 Nov 2012
Copyright © CodeProject, 1999-2015
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