I always cammel case mine as well, I hear it's a pretty accepted method naming convention.
-Michael. AI5HF http://mtgames.org/ http://u4u.be/ http://michael-taboada.org/ http://AI5HF.org/ http://the-status.net/ and http://the-stat.us/ Skype: lilmike2 Gmail: ai5hf.lilmike@xxxxxxxxx msn: ai5hf@xxxxxxxxxxx Twitter: http://twitter.com/MWTab PC details: Intel quad core 2.66 ghz; 4 gb duel channel ddr2 ram; 1 TB harddrive."The songs of the dead are the lamentations of the living." -- Christopher Paolini, Eldest. "A world that contained a creature as amazing as that bumblebee was a world he wanted to live in." -- Christopher Paolini, Brisingr.
-------------------------------------------------- From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx> Sent: Tuesday, March 22, 2011 1:01 PM To: <programmingblind@xxxxxxxxxxxxx> Subject: Re: first quick java program
Hello: I've always used cammel case for my method capitalization. why do you not capitalize methods? Is this something pertaining to Java? Or is it just a naming convention thing.Thanks, On 3/22/2011 11:59 AM, Stanzel, Susan - Kansas City, MO wrote:I have not studied the entire logic, but PrintBoard is a method and you don't cap the first word of a method. I don't think it would have to be static, but I am also a Java beginner. You might consider writing on the Java programming list.Susie Stanzel -----Original Message-----From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Littlefield, TylerSent: Tuesday, March 22, 2011 12:55 PM To: programmingblind@xxxxxxxxxxxxx Subject: first quick java program Hello all: I am writing a quick tic-tac-toe game, and so far I have Java printing out the board. I'm curious if 1) this is the right way to go about it, and 2), i'm noticing that I have to declare PrintBoard as static. Is there a way around that? Thanks, public class ttt { public static void PrintBoard(String[] board) { int i, j; System.out.println("|-|-|-|"); for (i= 0; i< 3; i++) { for (j = 0; j< 3; j++) { System.out.print(board[i*j]+"|"); } System.out.println("|-|-|-|"); } } public static void main(String[] args) { int i; String[] board = new String[9]; for (i = 0; i< 8; i++) { board[i] = " "; } PrintBoard(board); } }-- Thanks, Ty __________View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind