Results 1 to 1 of 1
-
Bad practices - Variable Assignments
Following are some of the bad practices related to variable assignments and should be ignored as they make code difficult to read and understand.
Above code is perfectly OK but its confusing and it is not easy to read it. Above code is better readable if written like this:Java Code:int a; int b; int c; a = b = 10; int d = (c = a + b) * 10 ;
Java Code:int a; int b; int c; a = 10; b = 10; c = a + b; int d = c * 10 ;
Similar Threads
-
getting the value of variable
By Lehane_9 in forum New To JavaReplies: 2Last Post: 03-05-2008, 01:42 AM -
Getting variable value from a variable name
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:26 PM -
Variable issues!
By Alex89 in forum New To JavaReplies: 1Last Post: 11-07-2007, 07:51 PM -
Create a new variable
By mathias in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:48 AM -
best practices guide to Java/J2EE web aps
By javaforme44a in forum New To JavaReplies: 7Last Post: 07-18-2007, 07:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks