Showing posts with label java naming convention. Show all posts
Showing posts with label java naming convention. Show all posts

Thursday, December 29, 2016

Naming Rules: in oracle dbms

Naming Rules:

-----------------------------------------------

1. Each name should begun with alphabetic character.

2. Void character set is a-z, A-Z, 0-9, @, #, $, _ used but first name should be a letter.

3. Names are not case sensitive.

4. Spaces not allowed within the name.

5. Duplicate names are not allowed.

6. Reserved words not allowed as names.

7. Maximum length of a name is 30 character length.

EX:

 Valid   | Invalid
emp_dtls   | emp-dtls
emp123   | 123emp
pdod#info | prod.detls
table123   |      table
--------------------------

Saturday, December 17, 2016

JAVA Naming Conventions

JAVA Naming Conventions:

--------------------------------------------------------------------------------------------------------------------------

JAVA is strictly a case sensitive programming language, where in JAVA application, there is a separate recognition for lower case letter and upper case letters.

In JAVA application to use lower case letters and upper case letters separately, JAVA has provided the following conventions-

1. All JAVA class names, abstract class names, interface names and enum names must be started with upper case letters and the subsequent symbols must also be upper case letters.

EX:
------
String (1 word)
StringBuffer (2 word)
InputStreamReader(3 word)

2. All JAVA variable name must be started with lower case letters but the subsequent symbols must be upper case letters.
EX:
-------
in, out, err             (1 word)
faceContext, bodyContent (2 words)

3. All JAVA method names must be started with lower case letters but the subsquent symbols must be upper case letters.
EX:
------
concat(-)
forName(--)
getInputStream(---)

4. All JAVA constant variables must be provided in upper case letters.
EX:
-------
MIN_PRIORITY
NORM_PRIORITY
MAX_PRIORITY

5. All JAVA package names must be provided in lower case letters.
EX:
------
java.io
java.awt.event
java.servelet.jsp.tagext



Note: All the above conventions are mandatory for predefined library, which are optional for used defined library, but suggestible.