Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Array conventions...
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Aziz




PostPosted: Tue Jul 11, 2006 4:41 pm   Post subject: Array conventions...

Which would be proper?

int[] nums;

or

int nums[];
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Tue Jul 11, 2006 4:45 pm   Post subject: (No subject)

The former.
Aziz




PostPosted: Tue Jul 11, 2006 7:00 pm   Post subject: (No subject)

thought so. the book i'm reading (killer game programming in java) uses the latter, along with other forms I don't really like :S (like typing methods public void run( ) , notice the space). I've wondered it for a while, though.
wtd




PostPosted: Tue Jul 11, 2006 10:22 pm   Post subject: (No subject)

Probably written by someone who thinks knowing C means knowing Java. Not that knowing C is necessarily bad for an aspiring Java programmer.
Krabjuice




PostPosted: Tue Jul 11, 2006 11:35 pm   Post subject: (No subject)

Remember, you're making an array of that type. Not an array of that name >_>
McKenzie




PostPosted: Wed Jul 12, 2006 9:09 am   Post subject: (No subject)

int nums[] is the old C style way of doing it. I know they allow it in Java to make that transition easier for C programmers. What don't understand is why people who are teaching Java, like your book, still use the old style when they know it is frowned upon. I've seen a University prof do the same thing.
Aziz




PostPosted: Wed Jul 12, 2006 1:48 pm   Post subject: (No subject)

Poopey people. Razz I've got my programming college program starting up in september, i hope they're not gonna start us off with newbie things (though they probably will). it'll be breasy anyways, i guess
wtd




PostPosted: Wed Jul 12, 2006 2:09 pm   Post subject: (No subject)

Pay attention to the "newbie" stuff anyway. They might say something it would benefit you to know. Smile
Sponsor
Sponsor
Sponsor
sponsor
Aziz




PostPosted: Wed Jul 12, 2006 5:57 pm   Post subject: (No subject)

Yeah, i've taken the (basically) same course in highschool 3 times. Well, each course had no prerequisits, so he started basic. I had already done the assigments the year before. Each time I usually make them more effecient, prettier, and a whole lot frikkin' needer. Not to mention, I was just reading you're Java tut, and I'm learning niftah things too. Not afraid to learn (or experiment, be glad I'm not going into chemistry)
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: