Search found 56 matches

by somefatman
Tue Apr 19, 2011 10:23 pm
Forum: Off The Wall
Topic: The programming thread!
Replies: 51
Views: 31876

Re: The programming thread!

I assume he meant for command line input/output input: import Scanner;//err check the import package stuff or have an IDE do it for you ... private Scanner input; ... input.nextInt();//returns next integer entered on command line, should error I believe if not proper input input.next();//returns wha...
by somefatman
Mon Apr 18, 2011 6:45 pm
Forum: Off The Wall
Topic: The programming thread!
Replies: 51
Views: 31876

Re: The programming thread!

The reason you make the fields private is so they are not messed with by outside code. This way, when working with the values you can be sure of the values and how they will behave. Java objects are supposed to be "black boxes" meaning that another coder need not know how they work on the ...
by somefatman
Sat Apr 09, 2011 11:45 am
Forum: Off The Wall
Topic: The programming thread!
Replies: 51
Views: 31876

Re: The programming thread!

What do you mean by Object indexes. An object Array would be: String[] stringArray = new String[5]; \\or do I want 4 can never remember if this number counts 0 stringArray[0] = "hi"; stringArray[1] = "Rolos"; stringArray[2] = "how"; stringArray[3] = "are"; str...
by somefatman
Fri Apr 08, 2011 8:24 pm
Forum: Off The Wall
Topic: The programming thread!
Replies: 51
Views: 31876

Re: The programming thread!

@War Machine I used to agree with placing the brackets on the next line to match opening and closing, but then I worked with a programmer who was really anal about following the standards so I learned to deal with it. @Rolos If you have any problem with using object arrays, you may want to look at t...
by somefatman
Fri Apr 01, 2011 8:58 am
Forum: Berserk
Topic: April Fools Chapter
Replies: 4
Views: 2594

April Fools Chapter

Some of you might be familiar with spectrum nexus. Anyway they released a chapter of Berserk this morning as joke with all gag dialogue: http://view.thespectrum.net/series/berserk-chapter-319.html I thought is was not bad, defiantly got by hopes up when I first saw it listed, but I almost instantly ...
by somefatman
Sat Mar 26, 2011 12:50 am
Forum: Berserk
Topic: Find the Berserk connections (Symbolism thread)
Replies: 311
Views: 299296

Re: Find the Berserk connections (Symbolism thread)

Why not : String squareString = String.valueOf(square); int finalDigit = Integer.valueOf(squareString.subString(squareString.length()-1)).intValue(); if (finalDigit == number){ System.out.print("The input number is curious"); } else {System.out.print("The input number is not curious&q...