Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 721341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:51:44+00:00 2026-05-14T05:51:44+00:00

through java reflection how to check that method name is in camelCase? e.g. import

  • 0

through java reflection how to check that method name is in camelCase?
e.g.

import java.lang.reflect.*;

   public class TestClass {
      private int simpleMethod(
       Object p, int x) throws NullPointerException
      {
         if (p == null)
            throw new NullPointerException();
         return x;
      }

      public static void main(String args[])
      {
         try {
           Class cls = Class.forName("method1");

            Method methlist[] 
              = cls.getDeclaredMethods();
            for (int i = 0; i < methlist.length;
               i++) {  
               Method m = methlist[i];
               System.out.println("name= " + m.getName());

            }
         }
         catch (Throwable e) {
            System.err.println(e);
         }
      }
   }

here i am getting method names simpleMethod and main
i have to check that these names are in camelCase.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:51:45+00:00Added an answer on May 14, 2026 at 5:51 am

    This problem is ill-defined. It’s easy to check if a string of letters starts with a lowercase ([a-z][a-zA-z]*), or to chop them up where uppercases are (see e.g. How do I convert CamelCase into human-readable names in Java?) and verify that they are words from some given dictionary, and things like that, but unless you’re told where to look for uppercases, it’s almost impossible to check if a string is a semantically proper camel case or not.

    • Is bitterAFlop a proper camel case? Maybe it should’ve been bitTeraflop?
    • What about getLinenUmber? (Yes! “umber” is a word!)
    • What about words from other languages?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a test class: import java.lang.annotation.Annotation; import java.lang.reflect.Method; public class TestAnnotations { @interface
We used a private method, through reflection, of a JDK class. Is there a
Is there a way to know the inner classes that a Class has through
I'm looking a utility method so that given a class will return the full
With Java reflection, one can get a constructor through getConstructor(klass, args) . However, when
Assume my class I have a field name called private long _quantity; I have
is it possible to get a generic (parametrized) method from a non-generic class through
I have a very simple Player class in java that uses some strategies object
I'm attempting to write a small library which will convert Java objects, through reflection,
Is it possible to get a Field through Java reflection if I have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.