This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!

wayne brandon

Ranch Hand
+ Follow
since Dec 18, 2017
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by wayne brandon

Carey? why should you avoid numbers? is it just for scalability down the line? i see what you doing here, very nice. but in this context what difference does it make?

Campbell, thanks for that,you are answering my other post on utility class? thanks I will study that code

thanks all
8 hours ago
in my while loop


does give me the desired result when asking a valid entry for 2 to 4 players, but is it ugly?

let me know
10 hours ago
hi guys

i have my navbar running horizontally across the page
i want to put icons for facebook/twitter and instagram (the icons are from fontawesome) to the right of it with a small space between the icons.
whats the best way to do this?
do i just add them to the class for my navbar?
or is there a better way to deal with this?
im taking responsiveness into account of course.
any help appreciated
Why yes Sheriff that makes perfect sense...
Thanks Claude for the reply

If you were me, what would your next move be?
learn the basics of javascript? or just try to do the project in its entirety and learn different areas as i go?
what you think?
Hi guys

my goal in life is to be a full stack developer (Which I am very very far from)

i have some java knowledge, a bit of python and html css and no javascript (Which im planning on doing now!)

i want to start a project with a website that allows a user to login and then upload short audio and video clips etc, and grow the funtionality from there.

i have a bunch of questions:

1) Do you think html,css,javascript is the way to go? I was reading that this is older technologies that are being replaced by things like frameworks, opensource tools etc...though i find this hard to believe

2) Does anubody know of a good tutorial on how this all links together? from what i know html and css create the content and style it. Javascript will handle your functionality to the backend. Java will handle the backend and querries to the database using spring? but to get this all working seems like something way beyond me now.

3) Is a project like this best done on my own server (which i have). Or should I be using web hosting server space (which i also have)

im just looking for any helpon where to start and how to get front end pulling and placing data in my database via java etc

thanks for reading
Hi guys

are there any word problem java exercises on this site
i dont like filling in the blanks types of questions

i prefer something like this:

6. Write a program to output a table of conversion from miles to kilometers. Miles shown should be integer values in the range 1 to 20. 1 KM = 5/8 Miles.

7. Write code that will read in a number from the user and will print out the number, the square of that number and the cube of all numbers from 1 to that number. Space the output of the number, its square and its cube using \t.

i had a few from my course i finished and am looking for more
i googled around but it was either like codebat which is fill in the blanks

anyidea where there are some good drills?
5 days ago
Hi guys

making a class to handle my user input so i dont have to keep writing the same stuff over again.

this is what i came up with:

now i have a few questions:

1) How should I handle printing out my captured input? Should i have each method saving values to a class variable? or should each method type (int, string etc) have another method that prints it out?
   or should i have one method that handles printing of each method (though with different types i dont know how i would do this)
2) Should the methods be static the way I have it, not sure if im on the right track here.

6 days ago
for a laugh im writing a random lottery number generator

but what i have noticed is that every few draws im only getting 5 numbers. I have gone over things a few times and guess its something to do with when the same number is drawn
im not sure about these lines:

can somebody please give me some advice on how to handle something like this.

this seems to work, no duplicate numbers, only 5, tell me what you think

dont know why i was adding after changing the random number again

is there a more efficient way of doing this?

Why cant i reply to my thread? i can only edit the original.

Irish lottery has a few draws with different number schemes, casue the Irish do things differently lol!

here is the entire program, seems to work well, though sometimes the exit isnt ending the menu loop. but i will look at it again

Please Campbell, tell me something to write!!!
1 month ago
hi guys,

its one thing im just not clear on. Variable names and logic for boolean problems. I would really like to understand this properly.

lets say i have a menu system:
1) Cars
2) Vans
3) Bikes
4) Exit system

now i want to write code to handle the menu

i am thinking like this

is that correct? i seem to get names for variables in these statements a bit awkwardly done so im practicing them.
Would like to learn the real general rule of thumb how you guys do it.

any info or thoughts would be amazing!

1 month ago
no everything is working fine till i go to start the league, then whatever is in there seems looped.
the print statement just loops
1 month ago
Just to clarify, a while loop should always have a sentinel variable then?

As far as the loop goes

this function is called from my main menu

createFixtures function is called from the else

the results are being drawn then loops endlessly

where in the UK are you? up north right?
weather in Cork was great today, hope we have the same summer as last year!!!

thanks for your help, muchly appreciated Campbell

1 month ago
right so breaks are bad news and while trues are a no no too, noted.
1 month ago
Hi all,

Making a team management program that I will hopefully create a GUI for (Down the road)

i have a few questions about the code:

1) How should a Python program be started? whats the usual way? i know there is a function thats like main in java. is it __main__ , is this just convention, i mean you dont have to have a main but it indicates where the
   program is running? Should you always name the starting function __main__?

2) When functions terminate does the program return to the position where the function was called?
   as i seem to have a loop running when i put a print statement in another function:


3) I think you guys said to me to never call functions from code at the end of other functions. Is that correct?
  so these lines are not great? There is a better way to design a program:

Sorry for all the questions, and also please if there is anything you find untowards please let me know

PS"Campbell I finsihed my course...No more SHORTS FOR ME!!! (Even though Summer has just started here)

1 month ago