-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJava_supporting.txt
More file actions
61 lines (47 loc) · 2.02 KB
/
Copy pathJava_supporting.txt
File metadata and controls
61 lines (47 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Manners and Rule to write java codes
----------------------------------------------------------------------------
• File name and class name alway try to write similar
• Name convention-->
i) Class name always written in PascalCaseConvention
ii) Function name always written in camelCaseConvention
• Comments written in only one types-->
i) Single line comments using ' // '
multi line comments are not declare with differently, use // to every line
• package convention-->
If you devlope a project for any company or institue or any others then you are able
to use those company name in your code. This is optional.
write ' package {company_name}; ' in the top of your code
i) Make sure company name is not similar to any syntex of java
ii) Company name is not contain any type of link
iii) Not start with any number
• Variable name convention-->
i) Not a keyword
ii) Never start with numbers
iii) Case sensative
iv) Never start with some special chars and Containing(+,-,*,~,etc)
v) Maximum digit length is 32
vi) Try to unique
vii) White space not allow use camelCase or PascalCase
i) Start with chars or some special chars($,&,etc)
ii) Containing numbers except 1st digit
iii) Static type
# Anatomy of a java program
----------------------------------------------------------------------------
|--> Documentation Section (suggested)
|--> Package Statement (optional)
|--> Import Statement (optional)
|--> Interface Statement (optional)
|--> Class Definitions (optional)
|--> Main Class (essential)
# Datatypes in java program
----------------------------------------------------------------------------
|-->Primative Data types |-->NonPrimative Data type
|
|-->Int
|-->float
|-->long
|-->char
|-->double
|-->bool
|-->byte
|-->short