Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Ed Lance

Ranch Hand
+ Follow
since Aug 02, 2000
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 Ed Lance

Well first let me say...good luck...I think you've been given an impossible task. The best senario would be to educate your management team a little to understand the cost and benefits of doing Java. The investment is a lot more than a few hours, but the benefits can be huge in terms of being able to handle changing requirements, lower code maintenance, and happier developers. In my opinion PHP is pretty much "throw away code"...good for a quick and dirty solution but certainly not a robust, long-term solution for an Enterprise app.

In the mean time, I would suggest perhaps working through the tutorials on the Sun site (www.java.sun.com) - great materials at a great price (free). Another good resource is Eckles, Thinking in Java.

Best of luck.
14 years ago
I've been programming / teaching Java for about 10 years now, depends on the topics and where the students are but here are some of my favorite books:

1. Head First - Kathy Sierra (love the entire Head First series!)
2. Thinking in Java - Bruce Eckles (see www.mindview.net)
3. Java How To Program - Deitel and Deitel

Hope that helps, good luck with your teaching!
14 years ago
Well done! I'm an instructor who's always looking for additional resources for my students. These are fantastic pre and post course support. I absolutely agree that diagrams and all that are required, but I have many students who've asked about audio books for their commute time etc.

Best of luck!
15 years ago
Can anyone tell me why the LAST System.out.println in the code below prints out true? It's the equals method in the Object class that gets run and that is the same as a == (memory) comparison. Do the Strings get put into the String pool when they are cast up to an Object??

Thanks in advance.



15 years ago
Question regarding caching of properties file data. Suppose I have a ResouceBundle that I refer to via a message-resouce tag.

What's the recommended way for caching this if I so desire? Would prefer not putting it in session.

Is there some way to keep a handle to the original ResourceBundle?

Thanks!
15 years ago
Above discussion is good but you left out one of the key strengths of the Collection framework. By using ArrayList it's even easier to convert to Sets, HashMaps etc., realize you can still do this with Vector but the method names vary slighty.

It's really about coding to the interface (Collection) not to the implementation, so that WHEN (not if) your requirements change you can take advantage of the good OO Design in the Collections framework to adapt.
16 years ago
It's been a while but since no one else is responding I'll take a shot.
Try the update method in your BaseApplet class, as I recall it takes a Graphics object as an argument and will refresh the screen for you.
16 years ago
Thanks Jeroen, that makes sense ...to easy :-)

Michael, like the listener approach. I agree it would be a bit more simple if you could somehow work with garbage collector but I think you'd have to worry about compatibilty in the future ...as gc's change. Thanks for sharing your solution.
16 years ago
arul,

Check out the SCJP forum on this site, there are a lot of great resources there. The short answer to your question is that you prepare by studying the objectives for the exam. You will have to know a few core clasess (things like String, Math etc.) but you certainly don't have to memorize tons of them.

Check out the cert forum and focus on why things work they way they do in OO and you'll do well.

Best of luck!
16 years ago
Not sure what you mean about "works fine". My guess is it COMPILES fine but with out the correct signature it is not the entry point to your program. Double check to make sure you aren't really running your previously compiled file.

Another example is that I can have the following main method:
public static void Main(String[] args){
}
...but again it's not the entry point for my application.
16 years ago
The closest way I can think of is getting the array from the request and checking for null...but that isn't specifically what you're asking.

Try this link for a work around.
Determine if user accepted a cookie
16 years ago
Michael...don't have a ready answer but a thought that may help. Isn't this similar behavior to Connection Pooling. I'm wondering how they keep the garbage collector from collecting a pooled connection object?
16 years ago
Yes, since the value of a final variable can't be changed once set it's essentially a read only variable.

The other thing to consider here is when will the variable be initialized, if it's essentially "hard coded" or set during init, everything should would smoothly.
16 years ago
Here's a simple sort example. NOTE - check out the second method that follows...it's a lot easier!



OR EVEN BETTER..the following sorts an array in natural order,
there's a lot of overloaded versions

Arrays.sort(deck);
16 years ago
Thanks Bosun...btw, is this documented anywhere? I checked Sun and googled pretty extensively and came up with nada.
16 years ago