Home Tags Java

Tag: java

Basic JAVA GUI Tutorial
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...
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...
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....
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 ...
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...
Java contains Interfaces, Classes and Objects. Distinguishing between each can be slightly difficult at first, but I will explain exactly what a Java interface is in the post. Firstly, I'd like to start with a short definition of the word "Interface". A device or program enabling a user to communicate with...
In Java, and generally in Object-oriented programming, there's this magical thing called "Encapsulation". Encapsulation brings variables and methods together as a single thing. This way the variables within (for ease' sake) an object can only be accessed by operating the object. Let's say we've got a Car and we want it to...
In Java there's a few different things; Objects, Classes and Variables to name a few. In this post I'll be explaining the difference between what an Object and an Object Variable is. What is an Object? An object is something that has a state and a behaviour. For example,  sparking water has...
Classes are super important in Java and most other Object-orientated programing languages. But what exactly is a Class? Classes Explained Simply Something used to describe an object Basically a blue-print If you want to make a Dog in Java. You obviously need a way of...
virus
Java comes with some different datatypes you can use from the start. To list a few (Source: Java for Dummies Quick Reference): Ints Strings Longs Byte Each acts as a "barrier" between the low-level programming required to make...
A priority-queue is an "abstract data type". It is similar to a normal queue, but certain elements take priority when they are polled (perhaps for a print statement). Why do we need priority queues? Let's say you're in the hospital with a sore-throat at midnight. You have waited your turn, and...
1,029FollowersFollow
3,103FollowersFollow