Kevin Stock

Greenhorn
+ Follow
since Jul 18, 2004
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Stock

Thanks James,

I tryed some test cases, and when not casting on the left it works fine. Why can't expressions such as that be on the left side? Doesn't casting effectivly 'replace' what was there with the casted object?
17 years ago

Originally posted by Sam Smoot:
Ok, this is, but isn't a homework question.



Would this happen to be Schrodinger's Homework?
17 years ago
Why does this work:


But not this:


Thanks,
Kevin
[ March 02, 2005: Message edited by: Kevin Stock ]
17 years ago
Thanks for the help, I used:

and it seems to be working fine.

Thanks,
Kevin
17 years ago
I've made a simple program that unscrambles words. I developed it in BlueJ which placed everything in one folder, including dictionary.txt, and used



Everything worked fine when I ran it from within BlueJ, but when I packaged it as a jar I got the following:



I checked the contents and the dictionary.txt is still there, any ideas what I need to do to make this work?

Thanks,
Kevin
[ January 17, 2005: Message edited by: Kevin Stock ]
17 years ago
Hello,

First off, I really enjoyed your (Cay's) book "Big Java" which I read over the summer in preparation for my ap-cs class since I was skipping intro. It helped a lot and I'm now one of the top students in the class.

I was wondering, what are the big differences / what will I learn from core java over big java?

Thanks,
Kevin
18 years ago

Originally posted by Warren Dew:
Kevin Stock:

I was wondering how Mac's preform comparted to windows, or more exactly: what is 1.5Ghz PowerPC compariable to in the x86 intel world?

A G4 at a given clock speed is about the same as a desktop P4 at 1.5 times the clock speed. Thus, a 1.5GHz G4 is about like a 2.25GHz desktop P4.

However, very few Intel notebooks actually have desktop P4 processors, due to their extremely high power consumption. The mobile processors found in most Intel notebooks are significantly slower at any given clock speed than desktop processors. This is not true for the Mac notebooks, where the G4 is the same processor that was found in their desktop machines until recently (when the desktop machines switched over to the 64 bit G5 processor).

I doubt you'll find any notebook out there that is faster overall than a 1.5GHz PowerBook.



Thanks a bunch, that's exactly what I was wondering.

-Kevin
18 years ago


Result


Why result is not a, ab ?

please explain to me.[/qb]<hr></blockquote>


Ok, let's walk through this code, but first notice I changed the String that Append takes in and call it something. First of all a new string reference is created 'data' which contains "a". This is printed. Then the method Append is called and the string reference 'data' is passed to it. It's is important to remember that strings are objects, and that the compiler changes the shorthand to the real method calls on the strings. It's also important to remember that Strings can't be mutated, everytime you change a string, you are actually creating a new string. With that in mind, Append looks at the String located by reference 'something' (which points to the same place that 'data' points to). It then takes this string and attaches a "b" to the end of it, however we must remember that the String can't be mutated, so it actually creates a new string, and then points the reference 'something' at the new string. The method exits and the string reference 'something' is deleted, and later the actuall string (which happens to be "ab") is garbage collected. The main then continues and looks where 'data' is pointing, which is still "a" because we never modified the String reference 'data' and the String "a" can't change, so it prints "a" again.

And just so everybody here knows, java passes objects by reference, not value.

Hope that helps,
Kevin

Edit: just noticed Petr answered this
[ September 29, 2004: Message edited by: Kevin Stock ]
18 years ago
I've been interested in buying a new computer recently, and my dream was to get a nice desktop and get linux working, however it has come to my attention that with school a laptop would really be my best choice. I've heard of the difficulties with linux on laptops and I don't really have the time to learn the linux completly.

So basically I'm down to either Windows XP (which I use currently on my desktop) or MacOS X. I'd like to try OS X since it's unix based and I could play around with that some, but I was wondering how Mac's preform comparted to windows, or more exactly: what is 1.5Ghz PowerPC compariable to in the x86 intel world?

Edit: Does Mac support wheel mouses?

Thanks,
Kevin
[ September 27, 2004: Message edited by: Kevin Stock ]
18 years ago
Thanks for the advice. I am fairly interested in programming and spent the entire summer teaching myself material from the intro couse that I skipped. However, I'm not sure yet if I want to make computer science my future career.

Thanks,
Kevin
18 years ago
I'm really new to java (just starting a computer science course in high school, and I studied over the summmer) and I was wondering: How much will this new version of java effect me? From what I can tell there isn't much that just simple users like myself would need.

Thanks,
Kevin
18 years ago
I use an assortment of free software to keep my computer clean along with my family's computer's and some computers at work (it's a small restraunt, and my parents own the place so I do the tech work) Here's a list, just google since I'm to lazy to make links right now.

Trendmicro Housecall
Panda Activescan
Ad-aware
Spybot SD
NAI Stinger
Spywareblaster

And, as recommended above, Firefox.
18 years ago
Thanks for the tip
[ July 30, 2004: Message edited by: Kevin Starr ]
18 years ago
I'm interested in building my own computer, but I really don't know where to start, so I've decided to ask for opinions and ideas as to what to do. I want the computer to use as a testing ground for playing with linux (but also windows compatible in the case that I want to use if for that) and it sould be capable of realitivly good preformance for general home use (internet, music, some light gaming, and of couse programming / running java stuff). My budget for this is around $1600 for the computer its self, I have a monitor, speakers, and mouse/keyboard. Any suggestions for where to start?

Thanks,
Kevin
18 years ago
I was wondering, is there a way I can make it so that when I double click ???.class file it will open a command line to the right file and run as "java ???"?

Thanks,
Kevin
[ July 21, 2004: Message edited by: Kevin Starr ]
18 years ago