Archive for the ‘Java’ Category

It’s been a while, but boy have I been busy! As the blog post title suggests, I am now a certified Java programmer, with a 90% passing grade. I won’t lie, it wasn’t easy, but it’s done! While I may not be working with Java in the immediate future, it looks like PHP is on […]

This is a little snippet of code I wrote for destroying an object in a game I’m working on with pals. See the comments in the code for an explanation. I used currentTimeMillis(); just to check that the code was working as it should, and left it in for demonstration purpose. The output is: Baddie hits wall, start timer: […]

TreeSet For Sorting Order

Posted: 21st November 2012 by Peter in Java
Tags: , , ,

We’re covering ‘Collections’, ‘Collection’ and erm…’collection’ in Java Programmer 6 at the moment. I’m familiarizing myself with the various Sets, Lists and Maps. A TreeSet orders its elements using ‘natural ordering’, i.e. alphabetical order for Strings, numerical order for ints. This is a very useful feature of the TreeSet that I wanted to experiment with. I wrote […]

We’re studying try-catch-finally exception handling at the moment, this is my solution from the Exercise 5-4, page 377 of SCJP 6 Study Guide (Sierra & Bates). I also used reference from this website section 1.9. I wrote the code in Notepad++ and compiled and ran it in Windows command-line. Exception Gets Handled! A String array […]

Just a quick update to report that I have earned my Java OO Fundementals Yellow Belt. Passing this exam, combined with my SCJA 6 qualification means I now officially know enough Java to work with IT companies. Add to that my digital multimedia, animation, and training qualifications, plus years of work experience and problem […]

I may actually have time to do some coding, now that I’m a Java Associate (see last post) and the intense studying has ended for a while. To kick things off I decided to go back to some of the early tutorials our class studied in the first month or so of the SCJA 6 […]

I’m SCJA 6 Certified!

Posted: 14th October 2012 by Peter in Java
Tags: ,

I’m currently house bound with a particularly nasty case of the dreaded Man-Flu. Despite my suffering I’m feeling fairly pleased with myself. I completed the Sun/Oracle Certified Java Associate 6 exam 11th Oct, and am pleased to report I passed with a 90% grade. There was no UML or ‘associations’ questions encountered by my classmates […]

Have you ever wanted to know how to read content from a text file using Java, but you were to embarrassed to ask? Follow these steps pilgrim (I’m assuming your using an IDE like NetBeans or Eclipse…): Create a new project folder. Create a package, call it readfromfile (all lowercase please). Create a new class […]

I’m new to Java’s Swing and I’m exploring it’s capabilities through NetBeans.  I’m experimenting with both hard coding and using the ‘Swing Gui Forms’ >> JFrame Form. In this post I’ll outline two ways of making your JFrame full screen, one for NetBeans JFrame Form, and the other for those hand coding their JFrame from […]

Comments Off on Java Swing Gui Game: Towers Of Hanoi

The Java Associate course is fantastic, and I’m getting my head around OO programming at last. We have completed two team projects to date, Hangman Gui, and Towers of Hanoi. This post is about the Tower project, my involvement, experience and review of the project and processes. To start with, below is the project requirements. […]