Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Variable Names

Basic variable naming conventions

Tutorial Details:

Choosing good names is probably the single most important factor in making programs readable -- or unreadable. It's worth spending some time to get good names. When I come back to a program of mine and find unhelpful names, the first refactoring I apply is to replace bad names with good names. Why would I choose bad names in the first place? When everything is fresh in your mind, you don't need the extra help of good names so its easy to choose an unhelpful name. Later, or to another reader, it's often obvious.

Sun's Code Conventions for the Java Programming Language (java.sun.com/docs/codeconv/) is the most widely used set of Java coding guidelines. Altho the organization you work for may have have different standards in some aspects, these variable naming conventions are almost always used. Here is what they have to say about variable names.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/data/variables/variable_names.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Variable Names

View Tutorial:
Variable Names

Related Tutorials:

Static class declarations
Static class declarations
 
Build an object database - JavaWorld January 2000
Build an object database - JavaWorld January 2000
 
Building a Java servlet framework using reflection, Part 2 - JavaWorld February 2000
Building a Java servlet framework using reflection, Part 2 - JavaWorld February 2000
 
Build an object database, Part 2: Object storage backend - JavaWorld April 2000
Build an object database, Part 2: Object storage backend - JavaWorld April 2000
 
Reveal the magic behind subtype polymorphism - JavaWorld April 2001
Reveal the magic behind subtype polymorphism - JavaWorld April 2001
 
Jato: The new kid on the open source block, Part 3 - JavaWorld May 2001
Jato: The new kid on the open source block, Part 3 - JavaWorld May 2001
 
Dynamically extend Java applications - JavaWorld August 2001
Dynamically extend Java applications - JavaWorld August 2001
 
Dynamically extend Java applications
Dynamically extend Java applications
 
JSP Standard Tag Library eases Webpage development
JSP Standard Tag Library eases Webpage development
 
replacing implementation inheritance by contract inheritance
replacing implementation inheritance by contract inheritance
 
Good introduction
Good introduction
 
Koalog Configurator v1.0
What is Koalog ConfiguratorTM? Koalog ConfiguratorTM is a configurator written in JavaTM. It comes with two graphical user interfaces (a Swing and web one), an XML importer and a maintenance application. With Koalog ConfiguratorTM, users can rapidly
 
Designing J2EE Applications for Real-Life Clustered Environments
Designing J2EE Applications for Real-Life Clustered Environments In this article, the authors draw from their practical experience to list and discuss some critical considerations when building J2EE applications so that they can be deployed in a cluste
 
Creating Varargs in Java 1.5 Tiger
Creating Varargs in Java 1.5 Tiger In this excerpt from Chapter 5 of the book, Brett and David cover how to create and iterate over variable-length argument lists (better known as varargs), which will have you writing better, cleaner, more flexible code
 
Smokescreen Introduction
Smokescreen is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
 
Smokescreen 3.4 has been released
Smokescreen is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
 
What package names are defined in the J2ME environment?
A compendium of J2ME package names, neatly arranged by JSR and presented for your illumination.
 
What are the defined J2ME system property names?
A compilation of J2ME properties sorted by JSR. Learn the names, test for optional packages or retrieve platform specific configuration values.
 
Java Technology Fundamentals
Learn how to use variable arguments lists, the new JConsole utility to monitor applications, and discover ways to learn what you need to know to get Sun certified.
 
Struts Validator Framework Tutorial with Example
Struts Validator Framework Tutorial with Example Struts HTML Tags Struts Validator Framework This lesson introduces you the Struts Validator Framework. In this lesson you will learn how to use Struts Validator Framework to validate the user
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.