Example
class MyClass { String name; String NAme; public static void main(String args[]) { } }
The conclusion should be:
name is in standard form NAme is not in standard form
Its possible through reflection. You can get all declared fields using: -
public static void main(String args[]) { Field[] fields = MyClass.class.getDeclaredFields(); for(Field field : fields ){ field.setAccessible(true); String name = field.getName(); //Check if name contains small letters or the logic to check if camel-case etc } }
You cannot do this for local variables
Source: https://habr.com/ru/post/1611447/More articles:Boto3, s3 folder is not deleted - pythonSitecore redirect module - sitecoreXcode 7: "No matching training profiles found" - iosПолучение нескольких запросов API с помощью React Native - apiNuitka on Windows - windows-7-x64Automatic numbering in linq query - listWhy, when I create the SqlClient type, do I get the missing method exception execution time? - f #Error trying to create an array of json objects in Rails 4 using PostgreSQL - jsonAttempting to call a function every 24 hours - javaSet the default value for a Postgres JSON column in Rails <4 - jsonAll Articles