How to Create a Password Application In Java

Password login
Image by TBIT – Pixabay

Tutorial On How To Create A Password Application In Java

In this tutorial, I will show you how to create a password application in Java. This application is using JPasswordField class.

The password field, of course, let users to enter a password. And just like every form of password around the world, password field displays echo characters instead of the password itself. The default echo character is a bullet, but you can change that echo character to any character on your keyboard.
Continue reading How to Create a Password Application In Java

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

How To Get User Input Using Console

Get User Input

Get User Input – Creating data by manually changing the variable inside the code is a usual thing to do. But, what if the data you need doesn’t exist yet? and that is until someone inputs it to your program.

Let’s do a small step and try to get input from users using the IDE’s console/terminal. This is a very easy thing to do, you can try to edit the code in any way you want it.

Continue reading How To Get User Input Using Console

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Advantages of Multithreading

Various Advantages of Multithreading

multitasking is and advantages of multithreading
Multitasking synonymous with efficiency

Advantages of Multithreading ~ These days the shortage of time has led us to a multitasking activities. Where that multitasking has been synonymous with the needs of efficiency. And that is not an exception for the programming world, a program that does a single task is just not enough anymore.

Continue reading Advantages of Multithreading

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Properties Class Inside Java Language

What Is Properties Class In Java?

Properties class in java uses both key and value pair as a string. Thus, the properties class can be used to store data. this class can be used to get data from properties file and store data to properties file. It can be used to get the Properties of System as well.

The Advantage Of Properties File

It’s a properties class file, thus it requires no recompilation. So if there is a change of information from the properties file. As a result java class doesn’t need to recompile by the user. In addition the programs frequently changed the information inside this properties class.

Continue reading Properties Class Inside Java Language

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Definition Of Comparator Interface

Definition Of Comparator Interface

Definition Of Comparator Interface ~ First of all, before reading this post you should understand what is an interface in craftingez6-coding.

You can found comparator interface in java.util.package and it contains 2 methods. Thus 2 of those methods are : .compare(obj1, obj2) and equals(Object element)

compare() method

public int compare(object1, object2)

Java Comparator Example (non-generic style)

Thus for this example I’ve created 2 class of sorting elements in the base of age and name. Due to the sake of simplicity of this article i’ve only created 2 :

  1. Age Comparator
  2. Name Comparator

Continue reading Definition Of Comparator Interface

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

What is a Comparable Interface?

What is a Comparable Interface?

What is a comparable interface – Coders can also order objects using java comparable interface. And rather than any type of class for that object. As a result, java uses user-defined class for this interface.

You can find java comparable interface inside the java.lang package since it is located inside that package. Therefore it contains only 1 method which seems like to be CompareTo(objects). Furthermore the interface provides single sorting element on a single data member only. So For an example it may be rollno, name, age or anything else.

compareTo(Object obj) method

Therefore to compare the current object with the specified object we used the syntax :

public int compareTo(Object obj)

Hence, Here is a list of what the element we can sort :

Continue reading What is a Comparable Interface?

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Java Data Structure Definition #2

Java Data Structure #2

So from the last article I already explain to you what is a Data Structure in general and what is a Java Data Structure. Just like I promised in that craftingez6-coding post, within this 2 post I’ll explain to you the Java Data Structure (interface and classes) one by one.

Enumeration

Enumeration is a type of Interface, enumeration itself is not actually a data structure, but it surely is very very important to the context of the other data structures. The enumeration interface means to retrieve a successive elements from a data structure.
In example,
Enumeration could define a method called nextElement. And that method is used to get the next element inside the data structure that contains more than 1 elements.
 

Bitset

BitSet is a type of class that implements a group of, guess what? “bits” or flags that you / the person can set and clear individually. This type of class is very useful in some cases where you need to keep up to code a set of Boolean values; you could just assign a bit to each value then set or clear it as appropriate

Vector

Vector class actually have similarities with a traditional Java array. Well except that Vector class can grow as necessary to accommodate new elements. 
 
Just like an array, the elements that is inside the Vector object can be accessed via index into the vector. You know what, the nice thing about Vector is that you doesn’t have to worry anymore about setting the elements into a specific size upon creation, it’ll actually grows and shrinks automatically when it is necessary.

The Stack

Stack class in java implements the last-in-first-out (LIFO) stack of elements. Imagine this illustration, you can imagine stack literally as a vertically stacked objects on top of each other. 
 
When you add new objects, it will get stacked on top of the others (the last object).
 
Then, when you pull an element off from that stacked objects. The last object will be the first object to come back off again.

The Dictionary

This dictionary doesn’t literally mean a dictionary, but it is rather an abstract class that defines data structure for mapping key to values. This kind class is useful whenever you want to access data via particular key rather than using an integer index.
Since the dictionary class is abstract, the class only provides the framework for a key mapped data. Rather than some specific implementation.

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Data Structure Definition Java

What is Data Structure?

Data Structure in javaData Structure,

first of all lets break it down to pieces : Data and Structure.
What is a data? Googling on the internet said :

Philosophy “things that is probably known or assumed as facts, making the basis of reasoning or calculation”.
                    Computing “the quantities, characters, or symbols on which operations are performed by a computer, being stored and transmitted in the form of another electrical signals and recorded on magnetic, optical, or mechanical recording media

Continue reading Data Structure Definition Java

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Java Non-Access Modifiers #1

Part Of Java Non-Access Modifiers

Java Non-Access Modifiers ~ Read the article in addition about Modifier Types before this (optionable).

Coding Java Non-Access Modifiers
Java Coding

Continue reading Java Non-Access Modifiers #1

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.

Java Modifiers Types Definition

Java Modifiers Types

So, folks.. first of all what goes through your mind when you hear “modify”, well for me when I hear that word the simplest meaning is to “change”. So what is a modifier, basically modifiers (In java) are a keywords that you can add to those definitions to change their meanings. In the java language there are a wide range of variety for java modifiers types, including the following modifiers :

  • Java Access Modifiers 
  • Java Non Access Modifiers

Continue reading Java Modifiers Types Definition

The programming language that I specialize in is Java, because I think Java programming language is more universal and of course because I like it regardless of any reason.