Should I use the Java naming convention?

I have been assigned a large project that will be executed in Java and reviewed by several programmers in a team. I want the code to be readable and understandable, so I want everyone in the naming convention to read it.

I am wondering if I need to use the Java naming convention so that other people can view and understand it. I always use a type of my own naming convention, which is not very different from the Java naming convention, but inheriting from the C / C ++ naming convention.

The biggest difference is the names of variables, classes, and methods. I use names like intLargestNumber, chGet, strNamefor variables. funType, funErase, funAdd, getThis, setThisfor methods and Screen, clsPlay, cls_Userfor classes. In the case where the Java naming convention will use myNumbersomething like for a variable myNumber, lowSplit()for a method and Imagefor a class.

My question is: should I use the Java naming convention or use my own naming convention and provide a lexicon or journal for my code?

+3
source share
10 answers

. , , .

+34

Java. , . , , . .

+12

. : . , - . , .

+11

, Java .

?

, , .

+3

Java Java . Java. , . () .

+3

H , , Java, Java-. ( .)

, , Java, Java, . ( !), , , . , ( 56 2- ): . , , , , , , Java-.

, , . C/++, , , - . Java-, , , Java, .

+3

. , .

+2

, - . , , , , , . , , IDE - , .

+1

, , . , .

If you already have a project, then this is a little more complicated. If this happens, you just have to decide whether to change the naming convention to the Java standard or keep it as it is. It is always painful to deal with code that is inconsistent with their name, so I would advise against a fragmented approach if you can avoid it.

+1
source

If you code in Java yes.

0
source

Source: https://habr.com/ru/post/1713554/


All Articles