Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: 'if' Statement - Indentation

Indent to make programs readable

Tutorial Details:

There are several meathods to make programs readable. How can you easily make the reader see which statements are inside the true part and false part of an if statement.

The best way to show this is to indent the statements that are inside. To do this you move the statements to the right by a few spaces. People commonly use two, three, or four spaces. Choose one number (eg, I use 2 or 3), and use it for all programs.

Java doesn't care about your indentation -- it is for humans (including yourself!).


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/flow/if/40if-indent.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
'if' Statement - Indentation

View Tutorial:
'if' Statement - Indentation

Related Tutorials:

Use JDBC for industrial-strength performance, Part 1 - JavaWorld January 2000
Use JDBC for industrial-strength performance, Part 1 - JavaWorld January 2000
 
XML document processing in Java using XPath and XSLT - JavaWorld September 2000
XML document processing in Java using XPath and XSLT - JavaWorld September 2000
 
Eliminate tedious programming: Recover data with XML and Reflection - JavaWorld November 2000
Eliminate tedious programming: Recover data with XML and Reflection - JavaWorld November 2000
 
A primordial interface? - JavaWorld March 2001
A primordial interface? - JavaWorld March 2001
 
Access the world's biggest database with Web DataBase Connectivity - JavaWorld March 2001
Access the world's biggest database with Web DataBase Connectivity - JavaWorld March 2001
 
Implement Design by Contract for Java using dynamic proxies
Implement Design by Contract for Java using dynamic proxies
 
Reinvented wheel
Reinvented wheel
 
Create your own type 3 JDBC driver, Part 3
Create your own type 3 JDBC driver, Part 3
 
How to build an interpreter in Java, Part 1: The BASICs (JavaWorld / May 1997 / by Chuck McManis)
How to build an interpreter in Java, Part 1: The BASICs (JavaWorld / May 1997 / by Chuck McManis)
 
Build an interpreter in Java -- Implement the execution engine (JavaWorld / July 1997 / by Chuck McManis)
Build an interpreter in Java -- Implement the execution engine (JavaWorld / July 1997 / by Chuck McManis)
 
Make a statement with javac!
Make a statement with javac!
 
Unwrap the package statement's potential
Unwrap the package statement's potential
 
Declarative Programming in Java
Declarative Programming in Java What makes EJB components special is the declarative programming model through which we can specify the services such as security, persistence, transaction etc., that the container should provide. An EJB only implements
 
SQL Database Access with DBTags
SQL Database Access with DBTags In a J2SE or J2EE application, Java Database Connectivity (JDBC) can be used to create a connection with a SQL database, create database tables, retrieve result sets, and update the database. To use a database from a Jav
 
Develop aspect-oriented Java applications with Eclipse and AJDT
AspectJ is an aspect-oriented extension of the Javaâ„¢ language that enables a modular implementation of crosscutting concerns. This crosscutting behavior, which can be static or dynamic, presents an extra challenge to tools that support AspectJ. The AJDT
 
Primrose - Free J2EE Database Connection Pooling Software
Primrose Primrose is a database connection pool, written in Java. Current containers support are Tomcat 4 & 5, and JBoss 3. There is also now a standalone version of primrose that can be used for applications not running inside a container.
 
What is the correct form of a MIDlet suite version number?
One character can be the difference between a successful installation and a failed attempt. Check your knowledge of MIDlet versioning.
 
Accessing Database from servlets through JDBC!
Accessing Database from servlets through JDBC! Accessing Access Database From Servlet T his article shows you how to access database from servlets. Here I am assuming that you are using win95/98/2000 and running Java Web Server. For the sake of
 
JSP FUNDAMENTALS
JSP FUNDAMENTALS JSP FUNDAMENTALS By: Hrishikesh Deshpande Introduction : JSP termed as Java Server Pages is a technology introduced by Sun Microsystems Inc. to develop the web application in more efficient way than Servlets. It has got many
 
Using Beans in JSP. A brief introduction to JSP and Java Beans.
Using Beans in JSP. A brief introduction to JSP and Java Beans. USING BEANS IN JSP Java Beans Java Beans are reusable components. They are used to separate Business logic from the Presentation logic. Internally, a bean is just an instance of a
 
Site navigation
 

 

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

Copyright © 2006. All rights reserved.