Click here to Skip to main content
11,581,510 members (59,370 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 OriginalGriff 340
1 Sergey Alexandrovich Kryukov 160
2 virusstorm 114
3 Frankie-C 105
4 RyanDev 84
0 OriginalGriff 1,273
1 Sergey Alexandrovich Kryukov 895
2 Abhinav S 597
3 F-ES Sitecore 500
4 Suvendu Shekhar Giri 433

Advertise | Privacy | Mobile
Web04 | 2.8.150603.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