Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
247 views

Java Naming Convention - Javatpoint

The document discusses Java naming conventions for different types of identifiers like classes, variables, methods, and packages. It recommends that class names begin with uppercase letters and be nouns, variable and method names begin with lowercase letters and be verbs or nouns, and package names be in all lowercase letters.

Uploaded by

Abhijeet Panwar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
247 views

Java Naming Convention - Javatpoint

The document discusses Java naming conventions for different types of identifiers like classes, variables, methods, and packages. It recommends that class names begin with uppercase letters and be nouns, variable and method names begin with lowercase letters and be verbs or nouns, and package names be in all lowercase letters.

Uploaded by

Abhijeet Panwar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

7/9/13

Naming Convention, Naming Convention in Java, Naming Convention Meaning, Define Naming Convention - Javatpoint

New: JAXB | Junit

Advertise Us | Ask Question | forum | login|

Home

Core Java

Servlet

JSP

Struts2

Mail API

Hibernate

Spring

Android

Quiz

Projects

Interview Q

Comment

Forum

Basics of Java OOPs Concepts Advantage of OOPs Naming Convention Object and Class Method Overloading Constructor static variable,method and block this keyword Inheritance(IS-A) Aggregation(HAS-A) Method Overriding Covariant Return Type super keyword Instance Initializer block final keyword Abstract class Interface Runtime Polymorphism static and Dynamic binding Downcasting with instanceof operator Package Access Modifiers Encapsulation Object class Object Cloning Java Array Call By Value strictfp keyword API Document Command Line Argument String Handling Exception Handling Nested Classes Multithreading Synchronization I/O Serialization Networking AWT Event Handling Swing LayoutManager Applet Reflection API Collection JDBC Java New Features RMI Internationalization <<prev next>> Interface name method name variable name package name constants name should begin with uppercase letter and be an adjective (whereever possible). e.g. Runnable,ActionListener etc. should begin with lowercase letter and be a verb. e.g. main(),print(),println(),actionPerformed() etc. should begin with lowercase letter e.g. firstName,orderNumber etc. class name should begin with uppercase letter and be a noun e.g.String,System,Thread etc.

Naming convention

<<prev

next>>

A naming convention is a rule to follow as you decide what to name your identifiers (e.g. class, package, variable, method, etc.), but it is not mandatory to follow that is why it is known as convention not rule. Advantage: By using standard Java naming conventions they make their code easier to read for themselves and for other programmers. Readability of Java code is important because it means less time is spent trying to figure out what the code does.

should be in lowercase letter. e.g. java,lang,sql,util etc.


0

should be in uppercase letter. e.g. RED,YELLOW,MAX_PRIORITY etc.

93

18

16
Google +

13

Tw eet

96

Like

13k

www.javatpoint.com/naming-convention

1/3

7/9/13

Naming Convention, Naming Convention in Java, Naming Convention Meaning, Define Naming Convention - Javatpoint

javatpoint.com
Like 13,318 people like javatpoint.com.

F acebook social plugin

www.javatpoint.com/naming-convention

2/3

7/9/13

Naming Convention, Naming Convention in Java, Naming Convention Meaning, Define Naming Convention - Javatpoint

Like the www.javatpoint.com on facebook / google+ / twitter / subscribe to get latest updates
Sitemap javatpoint.com is developed Core Java Servlet JSP Struts2 Hibernate Spring Android Interview Questions

to provide easy and point to point learning and training in detail. Examples might be simplified to improve reading and basic understanding. Tutorials and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. If there is any mistake, please mail to sonoojaiswal1987@gmail.com or sonoojaiswal@javatpoint.com. We provide assurance of 90% interview questions. While using this site, you agree to have read and accepted our terms of use and privacy policy. 2011-2013 Javatpoint. All Rights Reserved.

www.javatpoint.com/naming-convention

3/3

You might also like