Win a copy of Spring Boot in Practice this week in the Spring forum!

Brad Dwan

Ranch Hand
+ Follow
since Apr 22, 2010
Brisbane, Australia
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 Brad Dwan

Ernest Friedman-Hill wrote:

Brad Dwan wrote:Generally the finally block shouldn't be used except for "safety-net" situations. You should never rely on them to do their job for there is no guarantee that they will execute.

Hi Brad,

I think you're thinking of overriding the finalize() method, which is, as you say, not guaranteed to be executed. finally blocks, on the other hand, will always be executed after the corresponding try, with the single exception being that the finally block won't execute if the JVM exits (via System.exit() or a crash) during the try. That's an iron-clad guarantee.

My mistake. Noted. I can change a little of my own code then. :P
12 years ago

Michael Angstadt wrote:For the chicks

You've gotta stop dreaming.

I had a mate that had the best job title ever. "Penetration Tester". He was a hacker that used to test banks security systems i.e. big nerd. Used to be funny watching him try to pick up with that line. "I'm a penetration tester", he has been slapped like 5 times cause of it. I'm glad i found a mrs before I started programming, now shes stuck wid me ;P
12 years ago
Generally the finally block shouldn't be used except for "safety-net" situations. You should never rely on them to do their job for there is no guarantee that they will execute.
12 years ago
It gives you the "flexibility" of a low-level language such as c and c++, some capabilities emitted no doubt, without having to, most of the time, worry about memory allocation and collection. Portability is a big ++++ too.
12 years ago
As mentioned above, you could simply add another variable and let it contain the max value.


Thats just an example of how to achieve it, but there are other ways that are more refined.
12 years ago

Harry Tuttle wrote:...Developing Games in Java

Reading this at the moment. Definitely worth the buy.
12 years ago
top 3:
1/ The Departed
2/ Reservoir dogs
3/ Matrix Series
12 years ago
googled "concept of Classloader and JVM", last section & page 2 is what you want, but the whole article is useful to some.
12 years ago
google gave me this:

what's wrong with page1 you declared at the top?

also I don't really think you need extend Page with Notebook. You Already have an object page1; you should be able to access all of Page -s methods with that.
so you could use:

I dunno, haven't tested it or anything, but the object is there and methods are public, so I can't see why it wouldn't work.
12 years ago
Mothers a teacher right; grading papers, one of the biggest jobs a teacher has to sit through, up to a week of long days if they have a large class. Digitalizing grade papers and stuff like that isn't anything new right although, a lot of schools don't do this, 'old' pen and paper tests as still most common, especially with essay components.

The idea(not sure if it exists yet):
If you could set up a Scanner, auto-scan the physical papers into it, feed tray or something, have this program going accepting the scans (*.pdf), and literally reading them then grading them on spelling, creativity, grammar and alike. Then create a cover sheet (containing the scores, school logo, principles signature) and adding it to the scans collection(exam) PDF. Then store them appropriate of gender/year level [class ID]/name/age even.

Then all the teachers would need to do is load up the scanner with papers, the programs going to do all the heavy lifting, it processes it, teacher can check them, grades back in two hours.

Now I'm not saying I'm going to be making this, 1/ I don't have the skill in Java to pull it off yet. 2/ I don't even know if it's possible yet.

There'd need to be a lot of storage, a good scanner, software that 'reads' the pages, grades, converts, processes, sorts then stores. Probably even possible so that the program can "learn" from each paper thus allowing it to educate itself (grades more accurately the longer and more often its used) and that will involve less update releases, so AI in there some where.


Might be a completely retarded idea, probably already done, I was just bored thinking about a project to keep me busy, that popped up.
12 years ago
If you define a static method within a class, you no longer need to create said object before you call that particular method.
Google is your friend.
12 years ago
For reading clarity.

12 years ago

Jesper Young wrote:It's much simpler to just write:

No need for an if-statement or a ternary expression.

agreed, was just clarifying something stated previously.
12 years ago

Ankit Garg wrote:

Monu Tripathi wrote:I cant sneak around anymore!

And why do you need to sneak around

Its handy when the boss is looking for you. You hear him coming and go all ninja. Done it a few times, hence why I wear skaties :P Silent. Plus its good when you wanna share the shite outta a workmate. Cheap laughs, although everybody enjoys it so +1
12 years ago