name-length

Does Java have a limit on the class name length?

落花浮王杯 提交于 2019-11-27 21:50:00
This question came up in Spring class, which has some rather long class names. Is there a limit in the language for class name lengths? Robert Munteanu The Java Language Specification states that identifiers are unlimited in length. In practice though, the filesystem will limit the length of the resulting file name. Jon 65535 characters I believe. From the Java virtual machine specification: The length of field and method names, field and method descriptors, and other constant string values is limited to 65535 characters by the 16-bit unsigned length item of the CONSTANT_Utf8_info structure (

Max name length of variable or method in Java

孤者浪人 提交于 2019-11-27 21:48:48
Is there a max length for class/method/variable names in Java? the JLS doesn't seem to mention that. I know very long names are problematic anyway from code readability and maintainability perspective, but just out of curiosity is there a limitation (I guess class names might be limited by the file system maximal file name limitation). If I'm not mistaken, the limit is not in the language itself but in the classfile format, which limits names to 64k, so for all practical intents and purposes identifier length is not a problem. Specifically, this is the definition of a constant string in the

Maximum Method Name Length

亡梦爱人 提交于 2019-11-27 04:10:48
Does anyone happen to know what the maximum length of a method name is in your programming language of choice? I was going to make this a C# specific question, but I think it would be nice to know across the spectrum. What are the factors involved as well: Does the language specification limit this? What does the compiler limit it to? Is it different on 32bit vs 64bit machines? For C# I don't believe there's a specified hard limit. (Section 2.4.2 of the C# 5 spec doesn't give a limit, for example.) Roslyn v2.2.0.61624 seems to have a limit of 1024 characters; this is way beyond the bounds of

Max name length of variable or method in Java

北战南征 提交于 2019-11-26 23:06:08
问题 Is there a max length for class/method/variable names in Java? the JLS doesn't seem to mention that. I know very long names are problematic anyway from code readability and maintainability perspective, but just out of curiosity is there a limitation (I guess class names might be limited by the file system maximal file name limitation). 回答1: If I'm not mistaken, the limit is not in the language itself but in the classfile format, which limits names to 64k, so for all practical intents and

Maximum filename length in NTFS (Windows XP and Windows Vista)?

 ̄綄美尐妖づ 提交于 2019-11-26 00:19:20
问题 I\'m designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista? 回答1: Individual components of a filename (i.e. each subdirectory along the path, and the final filename) are limited to 255 characters, and the total path length is limited to approximately 32,000 characters. However, on Windows, you can't exceed MAX_PATH value (259 characters for files, 248 for folders). See http://msdn.microsoft.com/en