Categories
Certification Java Oracle Expert, Java Web Services XML

Service first using JAX-WS

There are two ways for developing services using JAX-WS, service first, and contract first. Service first means you would typically write the implementation first and generate the WSDL afterwards, whereas contract first you would define the WSDL first, then write the implementation afterwards. There are pros and cons for each approach, but I won’t dwell […]

Categories
Certification Java SCJP

How I passed the SCJP / OCPJP

After procrastinating for many years (4 to be precise), I finally sat and passed the SCJP exam. The exam itself wasn’t particularly difficult, but theres a lot of things you can get tested on that you’ll rarely use in everyday development. Having been developing in Java for around 4 years now, I’ve never needed to […]

Categories
Certification Java Programming SCJP

Continue and break, with and without labels, for the SCJP

Looping constructs are very useful in any programming language, however they can be come¬†particularly¬†complex when you have a variety of nested loops and you need to drop out from particular iterations, or exit the loops entirely under a set of given circumstances. Fortunately for us, Java provides us with 2 keywords that we can use […]

Categories
Certification Java Programming SCJP

Interfaces, declaring and implementing

Another bite-size SCJP blog post, this time we’ll tackle interfaces. Interfaces are, in the simplest terms, just a contract. It specifies things that a class must do if that class signs up to its contract, but it doesn’t provide any details of how those things must be done. For example, you may wish to create […]

Categories
Certification Java Programming SCJP

Polymorphism, a little overview with code samples

Polymorphism basically means that one thing can take many forms, and this is particularly useful for programmers, as it allows us to treat similar types of object in a single manner, yet the objects may actually be slightly different at runtime. One application of this might be where we have an animal class, we know […]

Categories
Certification Java Programming SCJP

Inheritance, some examples for SCJP study

Inheritance is a practice of one thing extending another. So you can more specific subclasses of a class. Inheritance is available in most programming languages, and in Java it is implied using the extends keyword. For example, you may have several objects like Car, Boat, Truck, these may all have common behaviour and state between […]

Categories
Certification Java Programming SCJP

Encapsulation; shielding state via the use of accessors

Encapsulation is a fantastic OOP concept of being able to shield class state via the use of accessor methods. Imagine that you have a class, perhaps called Person. This class will have some form of state, such as name, age, date of birth. These would most likely be stored against reference variables. If you left […]

Categories
Certification Java Programming SCJP

Overloading in Java, what it is and how you can use it, along with some examples

There are times when developing, when you need to do similar behaviour but with differing input arguments, for example you may have a method that prints something to the console. You may need to print Strings, Integers, and all sorts of other objects. You could (if you really wanted), create a method for each one […]

Categories
Certification Java Programming SCJP

Basics of the switch statement in Java

If statements are great, but sometimes they are just not very practical when you have to test for more than a handful of conditions, have a look at this very poor example of how you build up a long set of if-else statements, its fine for a few checks, but if you’re doing multiple equality […]

Categories
Android Certification Google App Engine Java Linux

Top 10 Techie things I want to achieve in 2012

I’m not the type of person that gets bored easily, I’ve always got many things to keep me amused, mostly side projects at home. I’m a firm believer, that if you don’t set yourself goals in the first place, then you won’t have anything to fail to achieve, so I’ve set myself a list of […]