A Basic Overview of PHP OOP (Object-Oriented Programming)

OOP is a programming languages the utilizes ¬†Objects. It tends to use data more than logic too. What are some advantages of OOP? Code is really easy to reuse. We use lots of Classes, Objects and Methods/Functions that can be called throughout your program. Encapsulation, which stops commands leaking outside of functions. Keeps everything in… Continue reading A Basic Overview of PHP OOP (Object-Oriented Programming)

Java GUI Tutorial: Swing, JFrame, JPanel, JButton, FlowLayout …

Graphical user interfaces are the quintessential part of any commercially¬†available¬†software. Could you imagine buying Microsoft Word if you had to input via command line? I certainly couldn’t. But, for many, making a GUI is tricky. Especially in Java. So, I’m going to shed the light on how to use Java’s Swing to create a basic… Continue reading Java GUI Tutorial: Swing, JFrame, JPanel, JButton, FlowLayout …

The Difference Between Method Overloading & Overriding in Java!

Overloading is the implementation of two more methods in the same class with different parameters (or arguments). Overriding is the implementation of two methods that have the same implementation but process differently. For example, you want to run a pizza deal, you would make an override method for your order. If a person orders 1… Continue reading The Difference Between Method Overloading & Overriding in Java!

How Many Constructors Can A Class Have (Overloading Examples)?

Classes in Java can have as many constructors as you like. Using “overloading” you can create an Object with different parameters. You can have constructors with no parameters, some with, some with partial amounts… What ever you like. Here’s an example.

This only real issue that you will run into is if you doing… Continue reading How Many Constructors Can A Class Have (Overloading Examples)?

The Difference Between Instance & Static Methods in Java

An instance method is a method used only for THAT VERY INSTANCE. A static method is FOR EVERY INSTANCE. Here’s a little code snippet to make your life easier. As usual.

In the case above. If you set the name in a static way.. all the persons are called John Doe. If you make… Continue reading The Difference Between Instance & Static Methods in Java

Pass A Text File to Scanner, Then Read It, in Java

The Scanner is super useful for taking user inputs. However, you might want to pass a text file into it. I’m going to show you how!

There are some important things… Import Scanner File IO File not found exception Try/Catch statements around Scanner using file File might not exist and break everything so …… Continue reading Pass A Text File to Scanner, Then Read It, in Java

Implicit & Explicit Parameters in Java, Explained

We’ve got the funky names for the things in Java. Implicit and explicit parameters. What the hell is that. As a programmer you’ve probably used them multiple times before without even knowing it. Just the nice guys that made the language decided to give it a name so no-coders would find it difficult to learn;… Continue reading Implicit & Explicit Parameters in Java, Explained