faqts : Computers : Programming : Languages : Java

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 3 people (0%) answered Yes
Recently 0 of 3 people (0%) answered Yes

Entry

Java: Identifier: Which identifier (variable, method, class,...) name notation conventions are used?

May 25th, 2006 18:56
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 26 May 2021 - 01:54 am ------------------------
Java: Identifier: Which identifier (variable, method, class,...) name 
notation conventions are used?
===
Java name conventions include:
 1. -Starting with a lower case character:
     1. -Variable names
         1. -E.g.
              rentalItem
     2. -Method names
         1. -E.g.
              customerMethod1
         1. -E.g.
              rentalItemMethod
 2. -Starting with an upper case character:
     1. -Class names
         1. -E.g.
              MyClass1
         1. -E.g.
              HelloWorld
     2. -Filenames
          (because the class name starts with a capital, and because
           the filename must have the same name as the class, it is
           also starting with a capital)
           1. -E.g.
                MyClass1.java
           1. -E.g.
                HelloWorld.java
 3. -Capitalization
     1. -If the sentence consists of several words, you usually start
         each word with an upper case character, the other characters
         within that word stay lower case.
         You call this also:
          Camel notation
          (because of hump, similar to the back of a camel)
         1. -E.g.
              ThisSentenceConsistsOfSeveralWords
===
Internet: see also:
---
----------------------------------------------------------------------