Sean Magee

Ranch Hand
+ Follow
since Aug 23, 2004
Merit badge: grant badges
For More
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 Sean Magee

For your static question, i htink this is a good way to put it.

Beginners have a hard time understanding programming terms, especially when you try to define them to the begiiner with more programming terms.

Best way to think about it is,

STATIC means that it stays put. so

if you have

SO the Static method stays put, the methodX is created along with class A.
17 years ago

Also, how can i get a program to change its code with recompiling itself all the time? I have heard suggestions about property files, but i dont know where to start.

I meant to say "without compiling itself all the tinme"
18 years ago
Hey there everyone

just wondering if anyone can provide me any info on where i can learn how
java and html work together over the web.

What are the good api's for extracting html data?

Also, how can i get a program to change its code with recompiling itself all the time? I have heard suggestions about property files, but i dont know where to start.

anyone have some helpful info on these subjects or good references?

Thanks everyone,

[ May 22, 2005: Message edited by: Sean Magee ]
18 years ago
Awesome! I was actually trying to reference something from the forums, and just happened to roll on by, and saw my name. I was completely suprised.

It was nice having you around Scott, I love the Ranch!

Edit: Wow, seems like there are specific topics discussed in Java Desktop Live that I have been eager to dive into. Actually, its exactly what i have been aiming for.
[ April 13, 2005: Message edited by: Sean Magee ]
18 years ago
wow, thats much nicer than mine. thanks Micheal for the help.
18 years ago
Hey there Ranchers!

I am completely new to threads, and do not really understand it completely.

Here is my code

I know this code isn't the nicest thing in the world, I don't mess around with GUI stuff that much. Its going to be some sort of art deco clock, I know the code will eventually need a complete overhaul.

However, could someone put me in the right direction so that the program checks itself frequetnly, lets say every second, so it updates it and changes the color of the buttons, thus displaying the time.

I cannot implment two things within the class, so here is what i started in another class, but I dont think I am going about it in the right way.

Can someone please boost me in the right direction?
Threads sound like a great concept that can let you do lots of cool things, but I do not think I am implmeneting it correctly. I mainly copied the code above to try to learn from it, and the java.sun docs can be confusing sometimes.

Thanks for any help n advance!

18 years ago
Avisesh, thanks a lot for your help. Sorry the previous post i wrote was really early in the morning, I meant only the left side gets insterted, not the right. However, everything works pretty nicely now. Since I am using JOptionPane stuff, for some reason a blank String gets created in the last slot of the array (not the last slot, but the last slot that is not null).

Thanks alot for your help and Layne's, I will be coninue to post the problems I have for this program. It is going to be a while before I complete it.
18 years ago
I hope this helps people to be able to udnerstand my problem more clearly.

Lets say I have the String " I am in the room and the light is on "

When this is run through the program, it is essential that i have the String " I am in the room" and have the String " the light is on ".

Likewise with "or" and many other delimiters i will be implementing in the future.

So, if i had " I was in the Room and the Light is on or I go play outside"

Should break up into

String 1 : " I was in the Room"
String 2 : " the Light is on "
String 3 : " I go play outside "

I still have not found a solution to this, thanks for anyone that can help.

Avisesh Jain, you have helped me clear a lot of my logic erros, thank you for that.
However, in the previous code you put up above, the code on the left side of the String does get slotted into the array, since there is only one "and"
only the right side gets inside the array.

-Sean Magee
[ March 22, 2005: Message edited by: Sean Magee ]
18 years ago
Thanks Layne!

However, i do not understand the indexOf() method, i understand it searches for a character, but how would i search for the word "and", "or" and multiple other words in the same string, eventually this program will become really robust. seems to me indexOf() will only saerch for a char and return an integer value, i dont think this is what i am loking for, unless I do not understand the indexOf() method correctly.


18 years ago

put the concatenated string in a buffer increment the index of the buffer

Could you elaborate what you mean here? I dont follow
18 years ago
Hello there,

I am having difficulty using the String tokenizer and the String buffer class together.

Let me be specific, I am trying to search a String, if it has the word "and", I want everything on the right side of "and" to be one String, and the other side to be a totally different string. I thought about using an array of StringBuffer, but i cannot correctly create a new StringBuffer in the while loop "while(st.hasMoreTokens)".

Any suggestions?

Here is some of my code, the problem i am having is in the doEvaluation method. compiles and runs fine,I just cannot split the Sring to make 2 new Strings.

Thank you

[ March 18, 2005: Message edited by: Sean Magee ]
18 years ago
Hey there!

I can definitely say that I am an official beginner. I have been coding in java for approximately 6 months. I feel as if i have different struggles with java than other beginners, but hey, what do i know? To answer Jeff's question I would like to list problems I do and do not have with java.

1. The biggest problem, by far, is being able to approach a problem or program effectively, effeciently, and coherently. I swear, I try the UML and I try to think as hard as I can to scribble down psuedo code as much as possible. However, it always seems like the Brain Lightning never starts striking until its just the computer and I, one on one. And I know this is very bad.

2. Container classes, and using them correctly has been a problem for me as well, someone care to explain exaclty why i use an Iterator? (please dont actually answer that in this forum )

3. So far, what I have actually dived into with OOP hasn't been as difficult as it has been enlightning, however, I do stumble when trying to understand how to use OOP as effectively as possible.

These are just a fragment of some of the big problems I have, and there are some the I am probably unaware of. A lot of these problems can be demonstrated with a new program, I just wrote,
18 years ago
Hi Jeff,

I have been hearing a lot of interesting topics pertaining to your book.
I am a beginner in java, so of course there is much improvement to be attained for developing. Where the curiousity seeks in is, Will a beginner benefit from Agile Java as much as an intermediate or expert? What kind of improvements would I see in my own developing due to TDD and topics discussed in your book?
18 years ago
Would like to mention on how much i appreciate all of your comments.

They are extremely helpful. I changed the indentions, maybe that will help
[ March 09, 2005: Message edited by: Sean Magee ]
18 years ago
This may be helpful, this may not be helpful. But I know if one of my teachers gave me an exam like that you would want to replicate the card deck so it that it resembles a real card deck. You may want to add a boolean [] in there.

This may also be harmful since sometimes you shouldn't add stuff when your not supposed to. this is kinda modeled after the game of bridge but you get the idea, im not talking about the actual dealing, just the representation of a real deck.

Sorry for not sticking to the conventions, and yeah, sorry if this post was unneccessary.
[ March 09, 2005: Message edited by: Sean Magee ]
18 years ago